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

Re: Table inheritance surprise

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: David Fetter <david(at)fetter(dot)org>
Cc: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Table inheritance surprise
Date: 2008-06-26 22:53:05
Message-ID: 200806262253.m5QMr5O18993@momjian.us (view raw or flat)
Thread:
Lists: pgsql-hackers
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

-- 
  Bruce Momjian  <bruce(at)momjian(dot)us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2008-06-27 00:37:19
Subject: Re: CVS Head psql bug?
Previous:From: Bruce MomjianDate: 2008-06-26 22:51:46
Subject: Removal of the patches email list

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