Skip site navigation (1) Skip section navigation (2)

BUG #5152: Exporting databases with pg_dump changes 'bigserial' to 'bigint'

From: "S(dot) Neumann" <simon(dot)neumann(at)communology(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5152: Exporting databases with pg_dump changes 'bigserial' to 'bigint'
Date: 2009-10-30 10:23:19
Message-ID: 200910301023.n9UANJPB092468@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      5152
Logged by:          S. Neumann
Email address:      simon(dot)neumann(at)communology(dot)com
PostgreSQL version: 8.3.7 and 8.4.1
Operating system:   Microsoft Windows
Description:        Exporting databases with pg_dump changes 'bigserial' to
'bigint'
Details: 

When exporting databases using pg_dump column types that are 'bigserial'
become 'bigint'. This problem did not occur on 8.0.8 on linux.

Steps to reproduce:
===================
1) Create a simple table using the 'bigserial' data type:
CREATE TABLE test
(
  id bigserial NOT NULL,
  something text NOT NULL,
  CONSTRAINT pk_performance_ts PRIMARY KEY (id)
)
WITH (OIDS=FALSE);

2) Export the database content with pg_dump (assuming the database is called
'test':
pg_dump -O -x -E UTF-8 -f <filename> test

Result:
=======
The exported plain SQL file contains the create statement:
--
-- Name: test; Type: TABLE; Schema: public; Owner: -; Tablespace: 
--

CREATE TABLE test (
    id bigint NOT NULL,
    something text NOT NULL
);

that differs from the statement used in 1) as the data type of column 'id'
now is 'bigint' and no longer bigserial.

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2009-10-30 13:59:38
Subject: Re: BUG #5147: DBA can not access view
Previous:From: Boris FolgmannDate: 2009-10-30 09:55:06
Subject: BUG #5151: autovacuum process segfaults when max_fsm_pages are too low

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group