BUG #2557: field`s default value not restored in big sql script

From: "Boris" <boris_k(at)iname(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2557: field`s default value not restored in big sql script
Date: 2006-07-31 16:54:29
Message-ID: 200607311654.k6VGsTu7071210@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 2557
Logged by: Boris
Email address: boris_k(at)iname(dot)com
PostgreSQL version: 8.1.4
Operating system: win 2000, freebsd
Description: field`s default value not restored in big sql script
Details:

Hi!
This sql script was created by pd_dump.
(http://www.lanukr.com/upload/errordump.zip)
No error when i run this script to restore DB.
But table "auth"."access_flag" has wrong def value for "access_flag_id".
I think ii must be
nextval('auth.access_flag_access_flag_id_seq'::regclass).

From script it becomes nextval('access_flag_access_flag_id_seq'::regclass)

When I run a shot script to create this table - no problem. deff value is
correct for field "access_flag_id"

CREATE TABLE "auth"."access_flag_2" (
"access_flag_id" SERIAL,
"access_flag_name" TEXT NOT NULL,
"comments" TEXT,
"long_flag_name" TEXT,
CONSTRAINT "access_flag_2_access_flag_name_key"
UNIQUE("access_flag_name"),
CONSTRAINT "access_flag_2_pkey" PRIMARY KEY("access_flag_id")
)

HOW TO:
1. Create db test
2. restore db from script by
psql -d test -U your_user_name -f dump.sql >123.log 2<&1

3. check if table "auth"."access_flag" has a field "access_flag_id" as PK
and has deff value nextval('access_flag_access_flag_id_seq'::regclass) (
error)

I can reproduse this error on "PostgreSQL 8.1.4 on i386-portbld-freebsd4.9,
compiled by GCC 2.95.4" too.

any info you need upon req.
ICQ 176869864
Boris

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Wang Haiyong 2006-08-01 08:16:29 pg_restore not work on windows 2000, when dump file size > 4G
Previous Message Murali Doss 2006-07-31 11:22:34 The column index is out of range in PostgreSQL + resolve