Re: pg_dump fails to include sequences, leads to restore fail in any version

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Jeffrey Baker <jwbaker(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump fails to include sequences, leads to restore fail in any version
Date: 2008-06-17 22:14:01
Message-ID: 20080617221401.GG10140@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jorgen Austvik 2008-06-17 22:26:05 Re: sh -> pl
Previous Message Jeffrey Baker 2008-06-17 21:51:32 Re: pg_dump fails to include sequences, leads to restore fail in any version