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.


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to