Thread: BUG #5152: Exporting databases with pg_dump changes 'bigserial' to 'bigint'
The following bug has been logged online: Bug reference: 5152 Logged by: S. Neumann Email address: simon.neumann@communology.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.
Re: BUG #5152: Exporting databases with pg_dump changes 'bigserial' to 'bigint'
From
Alvaro Herrera
Date:
S. Neumann wrote: > When exporting databases using pg_dump column types that are 'bigserial' > become 'bigint'. This problem did not occur on 8.0.8 on linux. Yeah, but this is not a bug. There are later commands that attach a sequence to the default value of the column, effectively turning it into a bigserial. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support