Type of text literals - Mailing list pgsql-novice

From Steve Baldwin
Subject Type of text literals
Date
Msg-id CAKE1AibZHfvNRt2t_+dMpHOH_+8Hq9TyRbJnt5JrAUMQemkv_g@mail.gmail.com
Whole thread Raw
Responses Re: Type of text literals  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-novice
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

pgsql-novice by date:

Previous
From: David Rowley
Date:
Subject: Re: An Inesrt on a partitioned table become very slow
Next
From: Tom Lane
Date:
Subject: Re: Type of text literals