Re: Arrays of Complex Types

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: David Fetter <david(at)fetter(dot)org>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Arrays of Complex Types
Date: 2007-03-03 13:14:57
Message-ID: 20070303131457.GA19036@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Fri, Mar 02, 2007 at 06:42:14PM -0600, Andrew Dunstan wrote:
> > I'm still not happy about the idea of doing this for every relation
> > (and doing it for sequences and indexes would be the height of
> > wastefulness). How about we only do it for composite types?
>
> I'm not happy about that. I agree that indexes and sequences should not be
> done, but can we please do plain table types? I would be OK if we skipped
> catalog tables, if that would make you happier.

Two thoughts:

1. Make the array types only when someone actually uses them (create a
table with it or something).

2. Make a command: CREATE TYPE ARRAY OF "foo";

The latter has the benefit of not restricting it to an arbitrary choice
of types, you could accept both domains and composite types here. I
don't think it's unreasonable to require people to predeclare their
usage of array-of-compostite-type.

Perhaps change the word "CREATE" to "DECLARE". I'm thinking of the
explicit declaration of shell types as precedent here.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message ranbeer makin 2007-03-03 13:32:41 PostgreSQL - 'SKYLINE OF' clause added!
Previous Message Andrew Dunstan 2007-03-03 11:49:46 Re: broken doc

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2007-03-03 14:06:11 Re: Arrays of Complex Types
Previous Message Neil Conway 2007-03-03 07:00:26 resetStringInfo