"Bozena Potempa" <[email protected]> writes:
> I have a test table with varchar(40) column. After executing the following
> query:
> select substr(fc,1,2) from test
> PQftype returns for the result column PG_TYPE_TEXT and PQfsize returns -1.
> Is it the expected behaviour?
Yes. substr() returns text. But even if it returned varchar, you'd
probably get -1 for the fsize. PG does not make any attempt to predict
the result width of functions.
regards, tom lane
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers