NEXTVAL function Bug

From: "Dan Wilson" <phpPgAdmin(at)acucore(dot)com>
To: "pgsql general" <pgsql-general(at)postgresql(dot)org>
Subject: NEXTVAL function Bug
Date: 2000-12-27 07:12:25
Message-ID: 013601c06fd4$5feb7430$078353d8@danwilson
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ok... I think I found a bug... tell me if I'm smoking something on this:

I create a table with a mixed case name... everything works fine until I try
to use the sequence created with the SERIAL datatype.

test_db=# create table "mixed_Case" ("mix_id" SERIAL, "mix_var"
varchar(50));
NOTICE: CREATE TABLE will create implicit sequence 'mixed_Case_mix_id_seq'
for SERIAL column 'mixed_Case.mix_id'
NOTICE: CREATE TABLE/UNIQUE will create implicit index
'mixed_Case_mix_id_key' for table 'mixed_Case'
CREATE
test_db=# \d "mixed_Case"
Table "mixed_Case"
Attribute | Type | Modifier
-----------+-------------+--------------------------------------------------
-------
mix_id | integer | not null default
nextval('mixed_Case_mix_id_seq'::text)
mix_var | varchar(50) |
Index: mixed_Case_mix_id_key

test_db=# insert into "mixed_Case" (mix_id, mix_var) values
(nextval('mixed_Case_mix_id_seq'), 'not working');
ERROR: Relation 'mixed_case_mix_id_seq' does not exist
test_db=# insert into "mixed_Case" (mix_id, mix_var) values
(nextval('mixed_Case_mix_id_seq'::text), 'not working');
ERROR: Relation 'mixed_case_mix_id_seq' does not exist
test_db=# insert into "mixed_Case" (mix_id, mix_var) values
(nextval("mixed_Case_mix_id_seq"::text), 'not working');
ERROR: Attribute 'mixed_Case_mix_id_seq' not found
test_db=# insert into "mixed_Case" (mix_id, mix_var) values
(nextval("mixed_Case_mix_id_seq"), 'not working');
ERROR: Attribute 'mixed_Case_mix_id_seq' not found
test_db=#

I know I could just do a: insert into "mixed_Case" (mix_var) values ('not
working')

But this is for phpPgAdmin and so due to certain issues, I need to have the
nextval function work as it would without a mixed case table name.

Is this expected behavior?

-Dan

Responses

Browse pgsql-general by date

  From Date Subject
Next Message W. van den Akker 2000-12-27 07:57:51 Re: User Privileges
Previous Message Bruce Momjian 2000-12-27 06:14:07 database web site