From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Tatsuo Ishii <ishii@postgresql.org>
Cc: mangoo <mangoo@wpkg.org>
Cc: scott.marlowe <scott.marlowe@gmail.com>
Cc: Kevin.Grittner <kevin.grittner@wicourts.gov>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: pgpool versus sequences
Date: Thu, 02 Jun 2011 11:10:00 -0400
Message-ID: <15726.1307027400@sss.pgh.pa.us> (raw)
In-Reply-To: <1307026309-sup-4021@alvh.no-ip.org>
References: <26909.1306965898@sss.pgh.pa.us>
<BANLkTikCRTeZ_g-rDay4RukWOY3Q7irCnQ@mail.gmail.com>
<27741.1306968830@sss.pgh.pa.us>
<20110602.080816.460114267356667394.t-ishii@sraoss.co.jp>
<1306971997-sup-5549@alvh.no-ip.org>
<BANLkTimgVA7mi2SP_ZVH-fsUB3VShTsMng@mail.gmail.com>
<14930.1307025118@sss.pgh.pa.us>
<1307026309-sup-4021@alvh.no-ip.org>
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Excerpts from Tom Lane's message of jue jun 02 10:31:58 -0400 2011:
>> That's a lot of work for a purely cosmetic issue, though. What would be
>> trivial is to let this work:
>> 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.
No it wouldn't. You seem to be imagining that sequences live in a
different namespace from tables, but they don't. There can only be one
relation that "s1" will refer to for any search_path setting.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, alvherre@commandprompt.com, robertmhaas@gmail.com, ishii@postgresql.org, mangoo@wpkg.org, scott.marlowe@gmail.com, kevin.grittner@wicourts.gov, pgsql-hackers@postgresql.org
Subject: Re: pgpool versus sequences
In-Reply-To: <15726.1307027400@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox