serial field dump bug - Mailing list pgsql-bugs

From Yury Don
Subject serial field dump bug
Date
Msg-id 399A398F.59E09EC7@vpcit.ru
Whole thread Raw
Responses Re: serial field dump bug
List pgsql-bugs
Dear Madam or Sir,

Looks like I've found a bug in PostgreSQL, bug report is in attachment.


--
Sincerely yours,
Yury============================================================================
                        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:
---------------------------------------------------------------------



pgsql-bugs by date:

Previous
From: "Woodcock, Steve"
Date:
Subject: Cannot delete newly inserted record while inside a transaction
Next
From: "Baley OUATTARA"
Date:
Subject: help me