Re: Different cast behavior of TEXT and VARCHAR

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Different cast behavior of TEXT and VARCHAR
Дата
Msg-id 9587.1302618584@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Different cast behavior of TEXT and VARCHAR  (tomas@tuxteam.de)
Ответы Re: Different cast behavior of TEXT and VARCHAR
Список pgsql-general
tomas@tuxteam.de 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

В списке pgsql-general по дате отправления:

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: PostgreSQL backend process high memory usage issue
Следующее
От: tomas@tuxteam.de
Дата:
Сообщение: Re: Different cast behavior of TEXT and VARCHAR