From: | Jeff MacDonald <oss(at)bignose(dot)ca> |
---|---|
To: | V S P <toreason(at)fastmail(dot)fm> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: pg_get_serial_sequence Strangeness/Unreliable? |
Date: | 2008-11-26 17:00:28 |
Message-ID: | 909DC8C7-2139-4AC7-8A0F-33F0C45B6C04@bignose.ca |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2008-11-26 17:04:18 | Re: pg_get_serial_sequence Strangeness/Unreliable? |
Previous Message | Jeff MacDonald | 2008-11-26 16:58:49 | Re: pg_get_serial_sequence Strangeness/Unreliable? |