Re: Domains versus polymorphic functions, redux

From: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Domains versus polymorphic functions, redux
Date: 2011-06-03 16:32:26
Message-ID: 20110603163226.GA27350@rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 03, 2011 at 11:22:34AM -0400, Robert Haas wrote:
> On Fri, Jun 3, 2011 at 1:14 AM, Noah Misch <noah(at)leadboat(dot)com> wrote:
> > No, there's no need to do that.  The domain "is" an array, not merely something
> > that can be coerced to an array.  Therefore, it can be chosen as the polymorphic
> > type directly.  Indeed, all released versions do this.
>
> Well, as Bill Clinton once said, "it depends on what the meaning of
> the word 'is' is". I think of array types in PostgreSQL as meaning
> "the types whose monikers end in a pair of square brackets". We don't
> in general have the ability to create a type that behaves "like"
> another type. In particular, you can't create a user-defined type
> that "is" an array in the same way that a domain-over-array "is" an
> array. If we had some kind of type interface facility that might be
> possible, but we don't.
>
Early on in this thread, one of the users of domains-over-array-type
mentioned that he really didn't want to use them that way, he'd be
perfectly happy with array-over-domain: i.e.: mydomain[]. How does that
impact all this at the rhetorical level under discussion?

Ross
--
Ross Reedstrom, Ph.D. reedstrm(at)rice(dot)edu
Systems Engineer & Admin, Research Scientist phone: 713-348-6166
Connexions http://cnx.org fax: 713-348-3665
Rice University MS-375, Houston, TX 77005
GPG Key fingerprint = F023 82C8 9B0E 2CC6 0D8E F888 D3AE 810E 88F0 BEDE

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-06-03 16:40:41 Re: reducing the overhead of frequent table locks - now, with WIP patch
Previous Message Noah Misch 2011-06-03 16:27:40 Re: Identifying no-op length coercions