Re: Making serial survive pg_dump

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Rod Taylor" <rbt(at)zort(dot)ca>
Cc: "Hackers List" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Making serial survive pg_dump
Date: 2002-06-13 13:46:21
Message-ID: 18908.1023975981@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Rod Taylor" <rbt(at)zort(dot)ca> writes:
> Store sequence information in the SERIAL creation statement:
> CREATE TABLE tab (col1 SERIAL(<start num>, <sequence name>));

This is wrong because it loses the separation between schema and data.
I do agree that it would be nice if pg_dump recognized serial columns
and dumped them as such --- but the separate setval call is still the
appropriate technique for messing with the sequence contents. We do
not need a syntax extension in CREATE.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 2002-06-13 14:20:42 Re: New string functions; initdb required
Previous Message Thomas Lockhart 2002-06-13 13:01:15 Re: New string functions; initdb required