NEXTVAL function Bug
От | Dan Wilson |
---|---|
Тема | NEXTVAL function Bug |
Дата | |
Msg-id | 013601c06fd4$5feb7430$078353d8@danwilson обсуждение исходный текст |
Ответы |
Re: NEXTVAL function Bug
|
Список | 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
В списке pgsql-general по дате отправления: