Re: [GENERAL] Bug with sequences in 6.4.2

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: wehner(at)digital-security(dot)com (Stefan Wehner)
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Bug with sequences in 6.4.2
Date: 1999-03-15 16:50:34
Message-ID: 199903151650.LAA16254@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

> Greetings,
> there seems to be a slight bug in the parsing of the
> nextval function, tested under 6.4.2.
> It affects also the SERIAL type.
>
> Symptom :
>
> CREATE SEQUENCE "AA";
> -- Correct, quoted identifier is allowed;
> SELECT NEXTVAL('AA');
> --Produces Error
> --aa.nextval: sequence does not exist
>
>
> Probable source of problem, the Argument to nextval is
> not handled correctly as an Table Identifier.
>
> E.g. nextval('"AA"') is generates
> "aa".nextval: sequence does not exist
>
> Note the lowercase between the quotes.
>
> I quickly browsed the sources, but have not found the
> place where the conversion to lowercase occurs.

OK, I have made the following change to allow case-sensitive handling of
nextval. It tries the exact case first, then tries lowercase.

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

Attachment Content-Type Size
unknown_filename text/plain 2.7 KB

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Matthew 1999-03-15 17:56:38 RE: [GENERAL] postgres and PERL
Previous Message Ross J. Reedstrom 1999-03-15 16:46:14 Re: [HACKERS] Re: [GENERAL] Bug with sequences in 6.4.2

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-03-15 16:53:56 developers globe
Previous Message Ross J. Reedstrom 1999-03-15 16:46:14 Re: [HACKERS] Re: [GENERAL] Bug with sequences in 6.4.2