Skip site navigation (1) Skip section navigation (2)

Re: pg_get_serial_sequence is inconsistent

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_get_serial_sequence is inconsistent
Date: 2004-10-28 05:44:27
Message-ID: 4180873B.9070904@familyhealth.com.au (view raw or flat)
Thread:
Lists: pgsql-hackers
> pg_get_serial_sequence() does dequoting/downcasing on its relation-name
> argument, but not on its column-name argument.
> 
> regression=# create table "FOO" ("Ff1" serial);
> NOTICE:  CREATE TABLE will create implicit sequence "FOO_Ff1_seq" for serial column "FOO.Ff1"
> CREATE TABLE
> regression=# select pg_get_serial_sequence('FOO','Ff1');
> ERROR:  column "Ff1" of relation "foo" does not exist
> regression=# select pg_get_serial_sequence('"FOO"','Ff1');
>  pg_get_serial_sequence 
> ------------------------
>  public."FOO_Ff1_seq"
> (1 row)

I presume the reason for that is that the first paramater can be qualified:

select pg_get_serial_sequence('"public"."FOO"', 'Ff1');

Chris

In response to

Responses

pgsql-hackers by date

Next:From: Magnus HaganderDate: 2004-10-28 11:55:53
Subject: Re: Win32 open items
Previous:From: Tom LaneDate: 2004-10-28 05:12:46
Subject: pg_get_serial_sequence is inconsistent

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group