Re: pgpool versus sequences

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgpool versus sequences
Дата
Msg-id 15726.1307027400@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pgpool versus sequences  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pgpool versus sequences  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Marko Kreen
Дата:
Сообщение: Re: Please test peer (socket ident) auth on *BSD
Следующее
От: Robert Haas
Дата:
Сообщение: Re: pgpool versus sequences