Skip site navigation (1) Skip section navigation (2)

Re: Table inheritance surprise

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: David Fetter <david(at)fetter(dot)org>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Table inheritance surprise
Date: 2008-06-27 12:11:56
Message-ID: 1214568716.3845.360.camel@ebony.site (view raw or flat)
Thread:
Lists: pgsql-hackers
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 propose another bit of
> > syntactic sugar, namely
> > 
> >     LIKE [INCLUDING FOREIGN KEYS]
> > 
> > which would do what it looks like it does.
> > 
> > What say?
> 
> TODO has:
> 
>         o Allow inherited tables to inherit indexes, UNIQUE constraints,
>           and primary/foreign keys

INCLUDING CONSTRAINTS is non-standard so maybe we can just make
INCLUDING CONSTRAINTS also include foreign keys.

-- 
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Training, Services and Support


In response to

Responses

pgsql-hackers by date

Next:From: Devrim GÜNDÜZDate: 2008-06-27 12:21:54
Subject: Re: Removal of the patches email list
Previous:From: Simon RiggsDate: 2008-06-27 10:06:57
Subject: VirtualXactLockTableInsert

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group