Re: 4.1beta1: ANYARRAY disallowed for DOMAIN types which happen to be arrays

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: greg(at)ngender(dot)net, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 4.1beta1: ANYARRAY disallowed for DOMAIN types which happen to be arrays
Date: 2011-05-10 17:53:06
Message-ID: BANLkTimVTDrnXzJ93E-JRnqZzWo+Qtc2Tg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 10, 2011 at 1:52 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Mon, May 9, 2011 at 11:32 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> So we basically had three alternatives to make it better:
>>>        * downcast to the array type, which would possibly silently
>>>          break applications that were relying on the function result
>>>          being considered of the domain type
>>>        * re-apply domain checks on the function result, which would be
>>>          a performance hit and possibly again result in unobvious
>>>          breakage
>>>        * explicitly break it by throwing a parse error until you
>>>          downcast (and then upcast the function result if you want)
>>> I realize that #3 is a bit unpleasant, but are either of the other two
>>> better?  At least #3 shows you where you need to check for problems.
>
>> Aren't any applications that would be broken by #1 broken already?
>
> My point is that doing #1 would break them *silently* --- if you did
> have a problem, figuring out what it was could require a great deal
> of sleuthing.

Eh, I'm confused. Explain further?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2011-05-10 17:54:03 Re: Formatting Curmudgeons WAS: MMAP Buffers
Previous Message Tom Lane 2011-05-10 17:52:10 Re: 4.1beta1: ANYARRAY disallowed for DOMAIN types which happen to be arrays