Thread: Re : pg_dump SERIAL and SEQUENCE
Yep, of course but what's the situation for people using 8.1 and pg_dump that does not generate code with SERIAL ?
Have fun,
L@u
The Computing Froggy
L@u
The Computing Froggy
----- Message d'origine ----
De : Andreas Kretschmer <akretschmer@spamfence.net>
À : pgsql-general@postgresql.org
Envoyé le : Jeudi, 18 Octobre 2007, 20h02mn 47s
Objet : Re: [GENERAL] pg_dump SERIAL and SEQUENCE
Laurent ROCHE <laurent_roche@yahoo.com> schrieb:
> Then when I drop tab_b, the SEQUENCE tab_b_colb1_seq is not dropped, however
> when I drop tab_a, the SEQUENCE tab_a_cola1_seq is dropped too !
> I am using PG 8.1 and ALTER SEQUENCE ... OWNED BY does not exist ! ! !
Read this message: <28684.1192378480@sss.pgh.pa.us>
,----[ quote Tom Lane ]
| In 8.2 and up you can use ALTER SEQUENCE ... OWNED BY ... to establish
`----
You see the difference?
Regards, Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknow)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org/
De : Andreas Kretschmer <akretschmer@spamfence.net>
À : pgsql-general@postgresql.org
Envoyé le : Jeudi, 18 Octobre 2007, 20h02mn 47s
Objet : Re: [GENERAL] pg_dump SERIAL and SEQUENCE
Laurent ROCHE <laurent_roche@yahoo.com> schrieb:
> Then when I drop tab_b, the SEQUENCE tab_b_colb1_seq is not dropped, however
> when I drop tab_a, the SEQUENCE tab_a_cola1_seq is dropped too !
> I am using PG 8.1 and ALTER SEQUENCE ... OWNED BY does not exist ! ! !
Read this message: <28684.1192378480@sss.pgh.pa.us>
,----[ quote Tom Lane ]
| In 8.2 and up you can use ALTER SEQUENCE ... OWNED BY ... to establish
`----
You see the difference?
Regards, Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknow)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org/
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
Laurent ROCHE wrote: > Yep, of course but what's the situation for people using 8.1 and > pg_dump that does not generate code with SERIAL ? They grab 8.2's pg_dump and connect with it to their 8.1 server, to generate a dump that does. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Alvaro Herrera <alvherre@commandprompt.com> writes: > Laurent ROCHE wrote: >> Yep, of course but what's the situation for people using 8.1 and >> pg_dump that does not generate code with SERIAL ? > They grab 8.2's pg_dump and connect with it to their 8.1 server, to > generate a dump that does. Actually, I bet the OP's problem is exactly that he did that already. 8.1 pg_dump *will* generate a SERIAL column definition, if it sees that the table being dumped was made that way. 8.2 prefers the OWNED BY route (for good reasons btw). regards, tom lane