Skip site navigation (1) Skip section navigation (2)

Re: session_id

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: "Riccardo G(dot) Facchini" <abief_ag_-postgresql(at)yahoo(dot)com>
Cc: Richard Huxton <dev(at)archonet(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: session_id
Date: 2004-11-17 15:19:39
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
On Wed, Nov 17, 2004 at 06:25:25AM -0800, Riccardo G. Facchini wrote:
> --- Richard Huxton <__> wrote:
> >
> > Add a new sequence to your database:


> Good idea, but it won't work for what I need.
> I'll be able to do get the nextval('my_session_id') as soon as the
> session initiates, but my problem is that I need to make all the
> subsecuent actions aware of that particular value. using
> currval('my_session_id') is not good, as any other session is likely to
> also change my_session_id to another value.

Where did you get the idea that currval() would be affected by other
sessions?  Richard mentioned that sequences are concurrency-safe,
as does the documentation.

Can you give us an example of where this wouldn't work?

Michael Fuhr

In response to


pgsql-sql by date

Next:From: Richard HuxtonDate: 2004-11-17 15:24:23
Subject: Re: session_id
Previous:From: Riccardo G. FacchiniDate: 2004-11-17 15:04:26
Subject: Re: session_id

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group