Re: Odd results in SELECT

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Odd results in SELECT
Дата
Msg-id 4265.989589194@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Odd results in SELECT  (Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu>)
Список pgsql-hackers
See my prior reply to Philip: the problem is that the given string is
longer than NAMEDATALEN.  When you writerulename = 'foo'
(rulename is of type NAME) the untyped literal string 'foo' gets coerced
to NAME, ie truncated to fit, and all is well.  When you writerulename = ('foo' || 'bar')
the result of the || operator is type TEXT, so instead rulename is
converted to TEXT and a text comparison is performed.  In this case the
righthand value is not truncated and so the match will always fail.
        regards, tom lane


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

Предыдущее
От: Yaacov Akiba Slama
Дата:
Сообщение: Re: New Linux xfs/reiser file systems
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Converting PL/SQL to PL/PGSQL