Re: BUG #2907: pg_get_serial_sequence quoting
- From: Bruce Momjian <bruce(at)momjian(dot)us>
- To: Adriaan van Os <postgres(at)microbizz(dot)nl>
- Cc: pgsql-bugs(at)postgresql(dot)org
- Subject: Re: BUG #2907: pg_get_serial_sequence quoting
- Date: Fri, 19 Jan 2007 20:38:38 -0500 (EST)
- Message-id: <200701200138.l0K1cc919181@momjian.us> <text/plain>
Adriaan van Os wrote:
>
> The following bug has been logged online:
>
> Bug reference: 2907
> Logged by: Adriaan van Os
> Email address: postgres(at)microbizz(dot)nl
> PostgreSQL version: 8.1.4
> Operating system: Mac OS X 10.4.6, intel
> Description: pg_get_serial_sequence quoting
> Details:
>
> In order to work with capitals (etc.), the table_name parameter of
> pg_get_serial_sequence needs double quotes inside single quotes, the
> column_name parameter requires a name within single quotes only.
I can confirm this is still a problem in current CVS:
test=> CREATE TABLE "Test" ("Xx" SERIAL);
NOTICE: CREATE TABLE will create implicit sequence "Test_Xx_seq" for serial column "Test.Xx"
CREATE TABLE
test=> SELECT pg_get_serial_sequence('Test', 'xX');
ERROR: relation "test" does not exist
test=> SELECT pg_get_serial_sequence('"Test"', 'Xx');
pg_get_serial_sequence
------------------------
PUBLIC."Test_Xx_seq"
(1 row)
test=> SELECT pg_get_serial_sequence('"Test"', 'xx');
ERROR: column "xx" of relation "Test" does not exist
Strangely, this was reported before, but not until November of 2006:
http://archives.postgresql.org/pgsql-general/2006-11/msg01111.php
We have it in the queue to review for 8.3. Hopefully there will a
change or documentation addition for this in 8.3.
--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Home |
Main Index |
Thread Index