Search Postgresql Archives

Re: Different cast behavior of TEXT and VARCHAR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tomas@xxxxxxxxxx writes:
> When PREPARing statements, the type guessing machinery seems to behave
> differently for VARCHAR and TEXT. Is this intentional?

Your example works for me, in all branches back to 8.2:

regression=# create table foo(a text, b varchar);
CREATE TABLE
regression=# PREPARE s1 AS SELECT a, b FROM foo WHERE a = $1;
PREPARE
regression=# PREPARE s2 AS SELECT a, b FROM foo WHERE b = $1;
PREPARE

I wonder if you have some nondefault operators installed that are making
the query ambiguous.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux