From: Yury Don <yura@vpcit.ru>
Cc: pgsql-bugs@postgresql.org
Subject: serial field dump bug
Date: Wed, 16 Aug 2000 12:49:51 +0600
Message-ID: <399A398F.59E09EC7@vpcit.ru> (raw)
References: <Pine.LNX.4.10.10008151535380.23383-100000@jagua.cfg.sld.cu>
Dear Madam or Sir,
Looks like I've found a bug in PostgreSQL, bug report is in attachment.
--
Sincerely yours,
Yury
Attachments:bug.txt (text/plain, 2.1K) download
============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================
Your name :Yury Don
Your email address :gercon@vpcit.ru
System Configuration
---------------------
Architecture (example: Intel Pentium) :Intel Pentium
Operating System (example: Linux 2.0.26 ELF) :Linux 2.2.15 Debian
PostgreSQL version (example: PostgreSQL-7.0): PostgreSQL-7.0.2
Compiler used (example: gcc 2.8.0) :gcc 2.95.2
Please enter a FULL description of your problem:
------------------------------------------------
After creating table with serial field if table or this field name has an uppercase
letters, sequence creating for this field doesn't double quoted. Consequently after
dump and restore of table "default nextval" clause contains name of sequence with all
characters in lower case and when user inserts data into table an error occured
"Relation '...' does not exist".
Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------
$ psql mdb
...
mdb=# create table "Qq"("Id" serial, "Name" text);
NOTICE: CREATE TABLE will create implicit sequence 'Qq_Id_seq' for SERIAL column 'Qq.Id'
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'Qq_Id_key' for table 'Qq'
CREATE
mdb=# \q
$ pg_dump -c -t qq -f qq_dump mdb
$ psql -e mdb <qq_dump
You are now connected as new user postgres.
DROP TABLE "qq";
DROP
CREATE TABLE "qq" (
"Id" int4 DEFAULT nextval('qq_Id_seq'::text) NOT NULL,
"Name" text
);
CREATE
COPY "qq" FROM stdin;
DROP INDEX "qq_Id_key";
ERROR: index "qq_Id_key" nonexistent
CREATE UNIQUE INDEX "qq_Id_key" on "qq" using btree ( "Id" "int4_ops" );
CREATE
$ psql mdb
...
mdb=# insert into qq ("Name") values ('q1');
ERROR: Relation 'qq_id_seq' does not exist
mdb=#
If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: yura@vpcit.ru, pgsql-bugs@postgresql.org
Subject: Re: serial field dump bug
In-Reply-To: <399A398F.59E09EC7@vpcit.ru>
References: <Pine.LNX.4.10.10008151535380.23383-100000@jagua.cfg.sld.cu> <399A398F.59E09EC7@vpcit.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox