Re: Typed tables
Peter Eisentraut <peter_e@gmx.net>
From: Peter Eisentraut <peter_e@gmx.net>
To: Merlin Moncure <mmoncure@gmail.com>
Cc: Andrew Dunstan <andrew@dunslane.net>, Andrew Chernow <ac@esilo.com>, pgsql-hackers@postgresql.org
Date: 2010-01-12T15:54:57Z
Lists: pgsql-hackers
On tis, 2010-01-12 at 09:54 -0500, Merlin Moncure wrote: > *) should 'create type as' get an 'alter'? ( I think most would think so) Working on that right now ... > *) if so, how do you distinguish between the composite and non > composite version? How would this command look? I'm only dealing with the composite types right now, and the syntax is ALTER TYPE name ADD/DROP ATTRIBUTE name, per SQL standard. > *) should we be able to define check constraints on composite types > (presumably, enforced on a cast)? That could be an interesting feature addition. It'd basically be the composite-type version of domains. > *) should 'create type as' should be walled off with 'create table' > handling most cases of type creation? (previously would have said yes, > but with typed table enhancement, probably not) This might be a matter of taste, but also note that these interfaces are prescribed by the SQL standard, so if you have them, they should do the things the spec says.