On Tue, Jun 17, 2008 at 2:43 PM, Alvaro Herrera <[EMAIL PROTECTED]>
wrote:

> Jeffrey Baker escribió:
> > On Tue, Jun 17, 2008 at 10:59 AM, Tom Lane <[EMAIL PROTECTED]> wrote:
> >
> > > "Jeffrey Baker" <[EMAIL PROTECTED]> writes:
> > > > It is impossible to dump (with pg_dump -Ocx) and restore (with psql)
> a
> > > > database which contains sequences in any of 8.1, 8.2, or 8.3:
> > >
> > > I should think we would have heard about it before now if such a
> > > sweeping claim were true.
> >
> > Last time this problem came up, in August, you dismissed it somewhat
> > rudely.  So perhaps the lack of reports is due more to perception than
> any
> > other thing.
>
> How did you set it up exactly?  I have no problem with this situation:
>

[snip]

The table was originally created this way:

CREATE TABLE transaction
(
        transaction_id          SERIAL PRIMARY KEY,
        buyer_account_id        INTEGER,
        seller_account_id       INTEGER,
        date                            DATE,
        item_id                         INTEGER,
        source                  TEXT
);

However, when dumped with pg_dump 8.1, it comes out this way:

CREATE TABLE "transaction" (
    transaction_id integer DEFAULT
nextval('transaction_transaction_id_seq'::regclass) NOT NULL,
    buyer_account_id integer,
    seller_account_id integer,
    date date,
    item_id integer,
    source text
);

.. and the sequence does not get dumped with it.

-jwb

Reply via email to