Re: pg_dump fails to include sequences, leads to restore fail in any version - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: pg_dump fails to include sequences, leads to restore fail in any version
Date
Msg-id 20080617221401.GG10140@alvh.no-ip.org
Whole thread Raw
In response to Re: pg_dump fails to include sequences, leads to restore fail in any version  ("Jeffrey Baker" <jwbaker@gmail.com>)
Responses Re: pg_dump fails to include sequences, leads to restore fail in any version
List pgsql-hackers
Jeffrey Baker escribió:

> 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
> );

Okay, but was it created on 8.1 or was it already created on an older
version and restored?  I don't see this behavior if I create it in 8.1
-- the field is dumped as SERIAL, unlike what you show.

--
-- Name: transaction; Type: TABLE; Schema: public; Owner: alvherre; Tablespace: 
--

CREATE TABLE "transaction" (   transaction_id serial NOT NULL,   buyer_account_id integer,   seller_account_id integer,
 date date,   item_id integer,   source text
 
);

$ pg_dump --version
pg_dump (PostgreSQL) 8.1.10


-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


pgsql-hackers by date:

Previous
From: "Jeffrey Baker"
Date:
Subject: Re: pg_dump fails to include sequences, leads to restore fail in any version
Next
From: Jorgen Austvik
Date:
Subject: Re: sh -> pl