just upgraded from 7.0 to version 7.3 problem with pg_dump

From: Christoph Schmidt <cs(dot)wiechs(dot)ar(at)swol(dot)de>
To: pgsql-novice(at)postgresql(dot)org
Subject: just upgraded from 7.0 to version 7.3 problem with pg_dump
Date: 2002-12-17 20:47:33
Message-ID: 3DFF8D65.DCB98BD5@swol.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Sorry, if this comes twice.
I sent it and didn't receive it myself.

Hi, I just downloaded 7.3 and
was a bit suprised.
Most things become better.
But
what I am missing is that :

1st the standard SQL says that
the create Table format should look like :
create table (
column1 .....,
column2 .....,
.
.
columnn......,
foreign key (......).....
);

But postgreSQL decided to put the foreign key-clause
yust behind the column-definition !
Why ???

2snd :
if you make a pg_dump, you will get
a list of create table statements - thats ok :-)
but there is -- different to the declaration --
no foreign key clause.
may be some hundred lines below you will
find :
ALTER TABLE ONLY aaa
ADD CONSTRAINT "$1" FOREIGN KEY (art_id_no) REFERENCES
bbb(art_id_no) ON UPDATE CASCADE ON DELETE CASCADE;

or something similar.

So why not the standard ?
and
why not the same format as in the declaration ?

If you want to document or to transfer from one database
to another it was (version 7.0 and before) better or easier
to do it.

Even if the former versions didn't support foreign keys
you could use the standard SQL-syntax.

Is there any way to make a dump in the old format ?????

If someone could give me a short instruction - and it is not toooo
difficult -- I would like to try a patch ??
or (and this is not so nice but may be easier) write a tool
or routine inside the pg_dump - code
which will do what I want. ?

(keep foreign key clause as a part of the definition and not as an
alter table
many lines later)

cs

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2002-12-17 23:29:51 Re: just upgraded from 7.0 to version 7.3 problem with pg_dump
Previous Message Aarni Ruuhimäki 2002-12-17 19:20:20 Re: Apache and Postgres modules