Re: [HACKERS] [BUGS] BUG #2907: pg_get_serial_sequence quoting - Mailing list pgsql-patches

From Adriaan van Os
Subject Re: [HACKERS] [BUGS] BUG #2907: pg_get_serial_sequence quoting
Date
Msg-id 45BF5FCF.1080708@microbizz.nl
Whole thread Raw
In response to Re: [HACKERS] [BUGS] BUG #2907: pg_get_serial_sequence quoting  (Bruce Momjian <bruce@momjian.us>)
List pgsql-patches
Bruce Momjian wrote:
> Adriaan van Os wrote:
>> Tom Lane wrote:
>>> Bruce Momjian <bruce@momjian.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

pgsql-patches by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Phantom Command IDs, updated patch
Next
From: "Greg Sabino Mullane"
Date:
Subject: Re: [HACKERS] pg_dump pretty_print