Table inheritance surprise

From: David Fetter <david(at)fetter(dot)org>
To: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Table inheritance surprise
Date: 2008-05-07 21:52:08
Message-ID: 20080507215208.GF15867@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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?

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2008-05-07 21:55:43 Re: printTable API (was: Show INHERIT in \du)
Previous Message Tom Lane 2008-05-07 21:43:52 Re: [HACKERS] bug in numeric_power() function