Search Postgresql Archives

Re: pg_get_serial_sequence Strangeness/Unreliable?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux