Re: 8.3 vs 8.2 sql compatiblity issue

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 8.3 vs 8.2 sql compatiblity issue
Дата
Msg-id 23619.1195160434@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: 8.3 vs 8.2 sql compatiblity issue  (Tony Caduto <tony_caduto@amsoftwaredesign.com>)
Ответы Re: 8.3 vs 8.2 sql compatiblity issue
Список pgsql-general
Tony Caduto <tony_caduto@amsoftwaredesign.com> writes:
> it was this line:

> case when a.attnum as text IN( select array_to_string(conkey,',') from
> pg_constraint where

> which is fixed by adding a cast:

> case when cast(a.attnum as text) IN( select array_to_string(conkey,',')
> from pg_constraint where

Surely that's the worst bit of SQL code I've seen in awhile.  Why
*weren't* you using "a.attnum = any(conkey)"??  Performing this
operation textually is simply bogus.

            regards, tom lane

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

Предыдущее
От: Tony Caduto
Дата:
Сообщение: Question about PostgreSQL from Delphi newsgroups
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Question about PostgreSQL from Delphi newsgroups