Friday, May 9, 2008

Re: [HACKERS] Table inheritance surprise

On May 7, 2008, at 4:52 PM, David Fetter wrote:
> When I do CREATE TABLE foo(LIKE bar INCLUDING CONSTRAINTS), it doesn't
> include foreign key constraints (8.3.1). I believe this is surprising
> behavior, but maybe not a bug, so I'd like to propose another bit of
> syntactic sugar, namely
>
> LIKE [INCLUDING FOREIGN KEYS]
>
> which would do what it looks like it does.


It's surprising to me that INCLUDING CONSTRAINTS doesn't include FK
constraints... is there a reason not to? Perhaps we should just
change INCLUDING CONSTRAINTS to do that...
--
Decibel!, aka Jim C. Nasby, Database Architect decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828

No comments: