"Joshua D. Drake" <[EMAIL PROTECTED]> writes:
> Tony Caduto <[EMAIL PROTECTED]> wrote:
>> I am actually getting a lot of these operator does not exist errors
>> in 8.3 another one I get is operator does not exist for char=integer
> This appears to be a classic example of:
> Casts to text that form
Tom Lane wrote:
> Tony Caduto <[EMAIL PROTECTED]> writes:
> > 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.
Wow, you really are lucky.
--
Alvaro Herrera http
Tony Caduto <[EMAIL PROTECTED]> 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
Su
Tom Lane wrote:
That's no doubt got something to do with it, but I think Tony is mighty
confused about exactly what is failing. pg_constraint.conkey is not
text, for instance; it's smallint[] and so the quoted bit should still
work just fine. I'd suggest trying the query in some client that giv
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Thu, 15 Nov 2007 12:03:27 -0600
Tony Caduto <[EMAIL PROTECTED]> wrote:
> I am actually getting a lot of these operator does not exist errors
> in 8.3 another one I get is operator does not exist for char=integer
>
This appears to be a classic ex