> 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
>
Let me comment on this. In the first statement, "AA" is used in an
SQL command, and we handle this correctly. In the second case, NEXTVAL
is a function, called with a string.
Now in parse_func.c, we convert 'AA' to lower to try and find the
sequence table. My assumption is that we should attempt to find the
table without doing a lower(), and if that fails, try lower.
Does that make sense to people. We can't just lower it in every case.
>
> 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.
>
> Please check this against 6.5 and 6.4.3 too.
>
> With Regards,
> Stefan Wehner
>
>
>
>
-- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610)
853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill,
Pennsylvania19026