Adriaan van Os wrote:
> 
> The following bug has been logged online:
> 
> Bug reference:      2907
> Logged by:          Adriaan van Os
> Email address:      [EMAIL PROTECTED]
> 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   [EMAIL PROTECTED]
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to