Type of text literals

Steve Baldwin <[email protected]>
Newsgroups gmane.comp.db.postgresql.novice
Message-ID <CAKE1AibZHfvNRt2t_+dMpHOH_+8Hq9TyRbJnt5JrAUMQemkv_g@mail.gmail.com>
Can someone please help me understand this:

b2bc_dev=# select pg_typeof('a') as a, pg_typeof(array['a']) as arr;
    a    |  arr
---------+--------
 unknown | text[]
(1 row)

Why is a text literal on its own 'unknown' whereas in the context of an
array it assumes 'text' ?

This is pg 10.4 in case it matters.

Thanks,

Steve
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.