Re: foreign keys

Bruce Momjian <pgman@candle.pha.pa.us>

From: Bruce Momjian <pgman@candle.pha.pa.us>
To: radek.stachowiak@alter.pl
Cc: pgsql-general@postgresql.org
Date: 2000-08-05T23:39:09Z
Lists: pgsql-general
> Not to mentions fact that in a few places in docs it's shown as a method
> for copying table "SELECT... INTO" which does not "take" keys with it
> leading to database knwoledge loss.

That is a good point.  SELECT INTO doesn't support constraints. 
Unfortunately, I don't really know a way around that.  The only solution
is CREATE TABLE and then INSERT INTO ... SELECT.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026