Re: [HACKERS] Table inheritance surprise

2008-06-27 Thread Tom Lane
Simon Riggs <[EMAIL PROTECTED]> writes: > On Thu, 2008-06-26 at 18:53 -0400, Bruce Momjian wrote: >> TODO has: >> >> o Allow inherited tables to inherit indexes, UNIQUE constraints, >> and primary/foreign keys But that TODO item is about inheritance, which has approximately zip to do with CREATE

Re: [HACKERS] Table inheritance surprise

2008-06-27 Thread Simon Riggs
On Thu, 2008-06-26 at 18:53 -0400, Bruce Momjian wrote: > David Fetter wrote: > > Folks, > > > > 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 prop

Re: [HACKERS] Table inheritance surprise

2008-06-26 Thread Bruce Momjian
David Fetter wrote: > Folks, > > 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

Re: [HACKERS] Table inheritance surprise

2008-05-09 Thread Decibel!
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 [INC

[HACKERS] Table inheritance surprise

2008-05-07 Thread David Fetter
Folks, 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