Re: pgpool versus sequences - Mailing list pgsql-hackers

From Robert Haas
Subject Re: pgpool versus sequences
Date
Msg-id BANLkTimUw2BP4SQjHTLfOv-ojT5EyU6DnQ@mail.gmail.com
Whole thread Raw
In response to Re: pgpool versus sequences  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, Jun 2, 2011 at 10:31 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> On Wed, Jun 1, 2011 at 7:47 PM, Alvaro Herrera
>> <alvherre@commandprompt.com> wrote:
>>> Yeah -- why is LOCK SEQUENCE foo_seq not allowed?  Seems a simple thing
>>> to have.
>
>> It cause a grammar conflict.
>
> That's a lot of work for a purely cosmetic issue, though.  What would be
> trivial is to let this work:
>
> regression=# create sequence s1;
> CREATE SEQUENCE
> regression=# begin;
> BEGIN
> regression=# lock table s1;
> ERROR:  "s1" is not a table
>
> We should do that anyway, even if we put in the effort to support the
> other syntax.

Ugh.  We are already stuck supporting all kinds of backward
compatibility cruft in tablecmds.c as a result of the fact that you
used to have to use ALTER TABLE to operate on views and sequences.
The whole thing is confusing and a mess.  -1 from me on extending that
mess to more places.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgpool versus sequences
Next
From: Teodor Sigaev
Date:
Subject: Re: vacuum and row type