From: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Typed tables |
Date: | 2010-01-11 14:00:09 |
Message-ID: | b42b73151001110600x436a0492uc32904d740424083@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Nov 9, 2009 at 5:15 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> On Sun, 2009-11-08 at 21:17 +0000, Simon Riggs wrote:
>> Not sure I see why this is good. Why is issuing CREATE TYPE so much
>> easier than using CREATE TABLE? Is it worth the extra syntax and code to
>> support it? Can we do anything additional as a result of this?
>
> These are tools to improve database design in particular situations.
> Nobody really *needs* this, but then again, you don't really need CREATE
> TYPE for composite types in the first place. Using CREATE TABLE instead
> of CREATE TYPE creates a bunch of extra things you don't need. For
> example, files are created, VACUUM and ANALYZE have to keep checking the
> table, backup tools think they have to back up the table, and you have
> to check that no one actually inserts anything into the table.
you also get the ability to alter the type though, which at present
outweighs the disadvantages in most cases (IMO).
I happen to be a fan of your proposal...mainly because it highlights
the highly under-appreciated composite type handling of the database.
I especially am excited about getting 'ALTER TYPE' in the future :-).
Do you think that we will ever able to apply constraints to composite
type that will be enforced on a cast?
merlin
From | Date | Subject | |
---|---|---|---|
Next Message | Arnaud Betremieux | 2010-01-11 14:08:03 | Re: Listen / Notify - what to do when the queue is full |
Previous Message | Abhijit Menon-Sen | 2010-01-11 14:00:03 | Re: mailing list archiver chewing patches |