Re: Error "cannot compare arrays of different element types"

From: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org, georg(at)solution-x(dot)com
Subject: Re: Error "cannot compare arrays of different element types"
Date: 2004-11-15 00:11:41
Message-ID: 4197F43D.50601@phlo.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> "Florian G. Pflug" <fgp(at)phlo(dot)org> writes:
>
>>Since sometime yesterday, my postgresql (7.4.5) reports
>>"ERROR: cannot compare arrays of different element types",
>>when I analyze a specific table in my database.
>>...
>>GOLink has the basetype int8, which GOLinkList has the basetype int8[].
>
> I wonder whether you have somehow managed to store some GOLinkList
> entries that internally show their element type as GOLink rather than
> int8. That shouldn't happen (since we don't support arrays of domain
> types) but it would explain the error message. Any idea what you did
> to create this situation?

Hm.. We hade some strange problems a week or so ago, where updating
fields of type GOLinkList would mange the numbers we where trying to
store. E.h, we did 'update datagraph."Filiale" set "Historie" =
"Historie" || array[1] where self = ...', but after the the update, the
last number in the "Historie" field would be some strangly large number
(somewhere in the range of a few millions). I'm not sure that these
problems happened for the "Filiale" table - I'll check with my collegue
who stumbled upton this...

Anyway, this only happened for a few records, and the problem vanished
after deleting and reinserting those records. Could it be that we
somehow managed to insert "GOLink"s instead of int8s into the
GOLinkList, and
those got misinterpretet as int8s when selecting, thus causing the
data-mangling?

greetings, Florian Pflug

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Neil Conway 2004-11-15 04:44:12 Re: Documentation of server configuration
Previous Message Tom Lane 2004-11-14 23:21:14 Re: Error "cannot compare arrays of different element types" when trying to ANALYZE