Re: pg_get_serial_sequence Strangeness/Unreliable?

Поиск
Список
Период
Сортировка
От Jeff MacDonald
Тема Re: pg_get_serial_sequence Strangeness/Unreliable?
Дата
Msg-id 909DC8C7-2139-4AC7-8A0F-33F0C45B6C04@bignose.ca
обсуждение исходный текст
Ответ на Re: pg_get_serial_sequence Strangeness/Unreliable?  ("V S P" <toreason@fastmail.fm>)
Список pgsql-general
On 25-Nov-08, at 10:51 AM, V S P wrote:

>
> Did you first insert into
> public.news_status
>
> insert into public.news_status (status_id)
> values (DEFAULT)
>
> and then get the sequence?
>

Hi VSP

I'm not sure what relevance this has, a sequence already exists
whether you insert into it or not. Just sometimes if you don't insert
or select, you cannot get the currval for that session.

>
> Also since you have a domain 'public' I personally
> always do 'set searc_path to public' before doing
> any SQLs -- this way I know that I do not need
> to prefix my table names with 'public' all the time.

I don't have a need for multiple schemas right now, so public is
assumed. Thanks tho.

jeff.


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

Предыдущее
От: Jeff MacDonald
Дата:
Сообщение: Re: pg_get_serial_sequence Strangeness/Unreliable?
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: pg_get_serial_sequence Strangeness/Unreliable?