Re: 8.3 vs 8.2 sql compatiblity issue

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tony Caduto <tony_caduto(at)amsoftwaredesign(dot)com>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Postgres General List <pgsql-general(at)postgresql(dot)org>
Subject: Re: 8.3 vs 8.2 sql compatiblity issue
Date: 2007-11-15 21:00:34
Message-ID: 23619.1195160434@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tony Caduto <tony_caduto(at)amsoftwaredesign(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2007-11-15 21:04:41 Re: Question about PostgreSQL from Delphi newsgroups
Previous Message Tony Caduto 2007-11-15 21:00:00 Question about PostgreSQL from Delphi newsgroups