Re: session_id - Mailing list pgsql-sql

From Bruce Momjian
Subject Re: session_id
Date
Msg-id 200411220431.iAM4V2V10588@candle.pha.pa.us
Whole thread Raw
In response to Re: session_id  ("Riccardo G. Facchini" <abief_ag_-postgresql@yahoo.com>)
List pgsql-sql
Riccardo G. Facchini wrote:
> No, I can't provide it because your'e right. currval() is NOT affected
> by other sessions.
> 
> Thanks anyway for the suggestion, using pg_backend_pid() solved the
> uniqueness I needed. I'll keep the nextval/currval for another
> opportunity.

FYI, we needed a unique-through-time session id for the log_line_prefix
so we used the seconds-since-1970-dot-pid.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-sql by date:

Previous
From: Mischa Sandberg
Date:
Subject: Re: SQL Question
Next
From: sreejith s
Date:
Subject: Doubt :- Image_Insert