From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Tatsuo Ishii <ishii(at)postgresql(dot)org>, mangoo <mangoo(at)wpkg(dot)org>, scott(dot)marlowe <scott(dot)marlowe(at)gmail(dot)com>, Kevin(dot)Grittner <kevin(dot)grittner(at)wicourts(dot)gov>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pgpool versus sequences |
Date: | 2011-06-02 14:55:26 |
Message-ID: | 1307026309-sup-4021@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-hackers |
Excerpts from Tom Lane's message of jue jun 02 10:31:58 -0400 2011:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > On Wed, Jun 1, 2011 at 7:47 PM, Alvaro Herrera
> > <alvherre(at)commandprompt(dot)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
Yeah, though it'd be nice to avoid this:
alvherre=# create schema public_too;
CREATE SCHEMA
alvherre=# set search_path to 'public_too', 'public';
SET
alvherre=# create table public_too.s1 ();
CREATE TABLE
alvherre=# create sequence public.s1;
CREATE SEQUENCE
alvherre=# begin;
BEGIN
alvherre=# lock s1;
LOCK TABLE
At this point we have a lock on the table, but if we change LOCK to also
look for sequences, the behavior would change. At the very least, the
command tag should be different.
Hopefully few people name sequences the same as tables ...
--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-06-02 15:10:00 | Re: pgpool versus sequences |
Previous Message | Tom Lane | 2011-06-02 14:47:15 | Re: pgpool versus sequences |
From | Date | Subject | |
---|---|---|---|
Next Message | Cédric Villemain | 2011-06-02 14:58:24 | Re: Re: patch review : Add ability to constrain backend temporary file space |
Previous Message | Tom Lane | 2011-06-02 14:49:04 | Re: Please test peer (socket ident) auth on *BSD |