Re: Arrays of Complex Types
От | David Fetter |
---|---|
Тема | Re: Arrays of Complex Types |
Дата | |
Msg-id | 20070328194107.GE5437@fetter.org обсуждение исходный текст |
Ответ на | Re: Arrays of Complex Types (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
On Wed, Mar 28, 2007 at 03:24:26PM -0400, Tom Lane wrote: > Gregory Stark <stark@enterprisedb.com> writes: > > "Tom Lane" <tgl@sss.pgh.pa.us> writes: > >> CREATE ARRAY TYPE FOR foo > > > I also made a suggestion along the way that we never create array > > types automatically except for domains. > > That seems awfully strange, not to mention very > non-backwards-compatible since it exactly reverses what happens now. > > I'd be willing to consider it if a domain were a zero-cost addition > to the equation, but it is not --- every operation on a domain has > to check to see if there are constraints to enforce. You shouldn't > have to buy into that overhead to have an array. The way I see the big picture, complex types, arrays and domains should all compose without limit, as in arrays of domains of complex types, etc. The SQL standard even has something like our SETOF (which should probably be called BAGOF, but let's not go there just now ;) in the form of MULTISET, and that, too, should eventually be in the above mix. I'm not advocating the idea that people should *store* those compositions--if it were just up to me, I'd disallow it--but they're very handy for input and output :) Cheers, D -- David Fetter <david@fetter.org> http://fetter.org/ phone: +1 415 235 3778 AIM: dfetter666 Skype: davidfetter Remember to vote! Consider donating to PostgreSQL: http://www.postgresql.org/about/donate
В списке pgsql-hackers по дате отправления: