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

Re: [HACKERS] [BUGS] BUG #2907: pg_get_serial_sequence quoting

From: Adriaan van Os <postgres(at)microbizz(dot)nl>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] [BUGS] BUG #2907: pg_get_serial_sequence quoting
Date: 2007-01-30 15:10:07
Message-ID: 45BF5FCF.1080708@microbizz.nl (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackerspgsql-patches
Bruce Momjian wrote:
> Adriaan van Os wrote:
>> Tom Lane wrote:
>>> Bruce Momjian <bruce(at)momjian(dot)us> writes:
>>>>> I presume the reason for that is that the first paramater can be
>>>>> qualified:
>>>>> select pg_get_serial_sequence('"public"."FOO"', 'Ff1');
>>>> Would someone explain why qualification makes us lowercase the first
>>>> parameter by default?  I don't understand it well enough to document it.
>>> The point is that we have to parse the first parameter, whereas the
>>> second one can be taken literally.
>> It still looks inconsistent and ugly. I think the design mistake of pg_get_serial_sequence is that 
>> it takes two parameters rather than one (a fully qualified doublequoted columnname path) or three 
>> (optionally empty schema, tablename, columnname, all three literal).
> 
> I did my best to document the behavior of pg_get_serial_sequence(). 
> There actually is a technical reason why we can't auto-quote the first
> parameter.  Patch applied to HEAD and 8.2.X.

Thanks for the doc change.

Adriaan van Os

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2007-01-30 15:17:13
Subject: Re: pgsql: Fix for plpython functions; return true/false for boolean,
Previous:From: Magnus HaganderDate: 2007-01-30 14:58:40
Subject: Re: [BUGS] Missing error message on missing ssl-key-files

pgsql-bugs by date

Next:From: Yosef HaasDate: 2007-01-30 15:13:56
Subject: Re: now() in PL/pgSQL Functions
Previous:From: Magnus HaganderDate: 2007-01-30 14:58:40
Subject: Re: [BUGS] Missing error message on missing ssl-key-files

pgsql-patches by date

Next:From: Tom LaneDate: 2007-01-30 15:17:13
Subject: Re: pgsql: Fix for plpython functions; return true/false for boolean,
Previous:From: Andrew DunstanDate: 2007-01-30 14:24:22
Subject: Re: pgsql: Fix for plpython functions; return true/false for boolean,

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