pg_get_serial_sequence is inconsistent

Lists: pgsql-general
From: "Frank Millman" <frank(at)chagford(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: pg_get_serial_sequence is inconsistent
Date: 2006-11-20 13:26:12
Message-ID: 20061120132843.02E753F439A@fcserver.chagford.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hi all

I found the following post dated October 2004 -

Tom Lane wrote:
> Christopher Kings-Lynne <chriskl ( at ) familyhealth ( dot ) com ( dot )
au> writes:
> >> pg_get_serial_sequence() does dequoting/downcasing on its relation-name
> >> argument, but not on its column-name argument.
>
> > I presume the reason for that is that the first paramater can be
qualified:
>
> Right. From a bare-functionality point of view there's nothing wrong
> with it, it just seems inconsistent and therefore likely to trip someone
> up in future.
>
> But it seems no one else cares, so I'll shut up about it ...

This inconsistency has just bitten me. Did anyone decide to fix it, or does
it still behave the same?

I am using 8.1.3. Apologies if this has been fixed in 8.2 - I could not find
anything in the Release Notes.

Thanks

Frank Millman


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Frank Millman <frank(at)chagford(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_get_serial_sequence is inconsistent
Date: 2006-11-20 21:28:17
Message-ID: 200611202128.kAKLSHU05630@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general


This has been saved for the 8.3 release:

http://momjian.postgresql.org/cgi-bin/pgpatches_hold

---------------------------------------------------------------------------

Frank Millman wrote:
> Hi all
>
> I found the following post dated October 2004 -
>
> Tom Lane wrote:
> > Christopher Kings-Lynne <chriskl ( at ) familyhealth ( dot ) com ( dot )
> au> writes:
> > >> pg_get_serial_sequence() does dequoting/downcasing on its relation-name
> > >> argument, but not on its column-name argument.
> >
> > > I presume the reason for that is that the first paramater can be
> qualified:
> >
> > Right. From a bare-functionality point of view there's nothing wrong
> > with it, it just seems inconsistent and therefore likely to trip someone
> > up in future.
> >
> > But it seems no one else cares, so I'll shut up about it ...
>
> This inconsistency has just bitten me. Did anyone decide to fix it, or does
> it still behave the same?
>
> I am using 8.1.3. Apologies if this has been fixed in 8.2 - I could not find
> anything in the Release Notes.
>
> Thanks
>
> Frank Millman
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

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


From: "Frank Millman" <frank(at)chagford(dot)com>
To: "'Bruce Momjian'" <bruce(at)momjian(dot)us>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_get_serial_sequence is inconsistent
Date: 2006-11-21 05:49:08
Message-ID: 20061121055134.5AE0D3F43B1@fcserver.chagford.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Bruce Momjian wrote:
> Subject: Re: [GENERAL] pg_get_serial_sequence is inconsistent
>
>
> This has been saved for the 8.3 release:
>

Thanks

Frank


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Frank Millman <frank(at)chagford(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_get_serial_sequence is inconsistent
Date: 2007-02-14 04:32:17
Message-ID: 200702140432.l1E4WHg15152@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general


FYI, we have at least documented this behavior in 8.2.X:

<function>pg_get_serial_sequence</function> returns the name of the
sequence associated with a column, or NULL if no sequence is associated
with the column. The first input parameter is a table name with
optional schema, and the second parameter is a column name. Because
the first parameter is potentially a schema and table, it is not treated
as a double-quoted identifier, meaning it is lowercased by default,
while the second parameter, being just a column name, is treated as
double-quoted and has its case preserved. The function returns a value

---------------------------------------------------------------------------

Frank Millman wrote:
> Hi all
>
> I found the following post dated October 2004 -
>
> Tom Lane wrote:
> > Christopher Kings-Lynne <chriskl ( at ) familyhealth ( dot ) com ( dot )
> au> writes:
> > >> pg_get_serial_sequence() does dequoting/downcasing on its relation-name
> > >> argument, but not on its column-name argument.
> >
> > > I presume the reason for that is that the first paramater can be
> qualified:
> >
> > Right. From a bare-functionality point of view there's nothing wrong
> > with it, it just seems inconsistent and therefore likely to trip someone
> > up in future.
> >
> > But it seems no one else cares, so I'll shut up about it ...
>
> This inconsistency has just bitten me. Did anyone decide to fix it, or does
> it still behave the same?
>
> I am using 8.1.3. Apologies if this has been fixed in 8.2 - I could not find
> anything in the Release Notes.
>
> Thanks
>
> Frank Millman
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

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