pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #5749: Case sensivity of names of sequences.
2+ messages / 2 participants
[nested] [flat]

* BUG #5749: Case sensivity of names of sequences.
@ 2010-11-11 15:26 Denis <DolgalevDenis@mail.ru>
  2010-11-11 22:12 ` Re: BUG #5749: Case sensivity of names of sequences. Kevin Grittner <Kevin.Grittner@wicourts.gov>
  0 siblings, 1 reply; 2+ messages in thread

From: Denis @ 2010-11-11 15:26 UTC (permalink / raw)
  To: pgsql-bugs


The following bug has been logged online:

Bug reference:      5749
Logged by:          Denis
Email address:      DolgalevDenis@mail.ru
PostgreSQL version: 9.0.1
Operating system:   Windows XP
Description:        Case sensivity of names of sequences.
Details: 

Hello.
I found some problem with sequences names. I am new in Postgresql, so sorry
if this problem was already discussed.
I wanted to make a simple table with ID column, that value must be taken
from the sequence (automatically incremented by 1 in every next record).
1. In GUI I created the sequence with name “NameSeq” (uppercase “N”
and “S”).
2. Then I was trying to create a table using this simple querry:
CREATE TABLE "Names"
(
   "NameId" bigint NOT NULL DEFAULT nextval('NameSeq') primary key, 
   "Name" char(20),
   "FirstName" char(30),
   "SecondName" char(30)
) 
WITH (
  OIDS = FALSE
)
;

But I get the error: “ERROR: relation "nameseq" does not exist SQL state:
42P01”
As you can see, sequence name in error message written in lowercase, but in
querry I used “NameSeq”.
3. I created new sequence “nameseq” (“n” and “s” in lowercase)
and the querry was completed without errors.
Should the sequence names always be in lowercase or it`s a bug?



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #5749: Case sensivity of names of sequences.
  2010-11-11 15:26 BUG #5749: Case sensivity of names of sequences. Denis <DolgalevDenis@mail.ru>
@ 2010-11-11 22:12 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
  0 siblings, 0 replies; 2+ messages in thread

From: Kevin Grittner @ 2010-11-11 22:12 UTC (permalink / raw)
  To: Denis <DolgalevDenis@mail.ru>; pgsql-bugs

"Denis" <DolgalevDenis@mail.ru> wrote:
 
>   nextval('NameSeq')
 
Does it work if you specify?:
 
  nextval('"NameSeq"')
 
Generally, when the parameter is a character string representing an
identifier you must include quotes to preserve the capitalization.
 
-Kevin



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2010-11-11 22:12 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-11-11 15:26 BUG #5749: Case sensivity of names of sequences. Denis <DolgalevDenis@mail.ru>
2010-11-11 22:12 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>

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