Re: BUG #4688: Bug in cache. - Mailing list pgsql-bugs

From Heikki Linnakangas
Subject Re: BUG #4688: Bug in cache.
Date
Msg-id 49AD51D0.4090807@enterprisedb.com
Whole thread Raw
In response to Re: BUG #4688: Bug in cache.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #4688: Bug in cache.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Tom Lane wrote:
> Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
>> Tom Lane wrote:
>>> Although this qualifies as pilot error (superusers are expected to know
>>> what they're doing), should we attempt to prevent the case?
>
>> We can't detect binary-incompatibility in general, so I presume you
>> meant just for the case of composite types. Hmm, I guess we could do it
>> in that case.
>
> Right, I was envisioning "if both types are composite and there's no
> function supplied, throw error".

If we go down that path, how far do we go? We also know that two enums
are never binary-compatible, right? Composite type and a user-defined
base type? Hardly, unless you're doing something very hacky...

Disallowing binary casts when any composite types or enums are involved
seems sane, but that's as far as we can go with a few lines of code.

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

pgsql-bugs by date:

Previous
From: Guillaume Smet
Date:
Subject: Re: BUG #4688: Bug in cache.
Next
From: Tom Lane
Date:
Subject: Re: BUG #4688: Bug in cache.