Bug report
Bug report
От:
Pascal Van Puymbroeck <pascal.vanpuymbroeck@zenonproductions.be>
Дата:
PGadmin version 1.6.3 release 6112 on windows
from the binary zip file from postgres8.2.5
Creating a sequence by means of the graphical interface works, though a subsequent select nextval() claims he can't find the sequence
the script that is created:
-- Sequence: "Uqn7"
-- DROP SEQUENCE "Uqn7";
CREATE SEQUENCE "Uqn7"
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 3
CACHE 1
CYCLE;
ALTER TABLE "Uqn7" OWNER TO live;
If I create the sequence without the double quotes
-- Sequence: "Uqn7"
-- DROP SEQUENCE "Uqn7";
CREATE SEQUENCE Uqn7
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 3
CACHE 1
CYCLE;
ALTER TABLE Uqn7 OWNER TO live;
The sequence is created and works !
Pascal Van Puymbroeck
ZENON productions bvba
BELGIUM
Re: Bug report
От:
Dave Page <dpage@postgresql.org>
Дата:
Dave Page wrote:
> Pascal Van Puymbroeck wrote:
>> *PGadmin version 1.6.3 release 6112 on windows
>> from the binary zip file from postgres8.2.5*
>>
>> Creating a sequence by means of the graphical interface works, though
>> a subsequent select nextval() claims he can't find the sequence
>>
>
> ...
>
>> If I create the sequence without the double quotes
>
>> CREATE SEQUENCE Uqn7
>
> ...
>
>> The sequence is created and works !
The name gets folded to lower case without the quote so I suspect what
is happening is that you are not quoting the name in the nextval call
correctly. This works:
SELECT nextval('"Uqn7"');
To avoid having to use the double quotes at all, stick to names that
aren't keywords, and are lower case only, optionally including numbers or _
Regards Dave