Re: 8.3 vs 8.2 sql compatiblity issue - Mailing list pgsql-general

From Tom Lane
Subject Re: 8.3 vs 8.2 sql compatiblity issue
Date
Msg-id 23619.1195160434@sss.pgh.pa.us
Whole thread Raw
In response to Re: 8.3 vs 8.2 sql compatiblity issue  (Tony Caduto <tony_caduto@amsoftwaredesign.com>)
Responses Re: 8.3 vs 8.2 sql compatiblity issue  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List 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 by date:

Previous
From: Tony Caduto
Date:
Subject: Question about PostgreSQL from Delphi newsgroups
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Question about PostgreSQL from Delphi newsgroups