Hello All-
I am in the process of replacing the backend for a large MS Access
project with PG.
I really could use a Session ID. I would like to create a view like
this:
CREATE VIEW mysettings
AS
SELECT * FROM mysettingstable
WHERE sessionidcolumn = CURRENTSESSIONID()
It is essential that we be able to reference a session id without
passing it in, as this has to work within the "linked table" paradigm
of Access and a lot of Access forms that have already been developed.
The TEMPORARY TABLE feature of PG seemed ideal for these purposes.
However, after burning many many days on 2 different attempts at
solving this using temp tables (first attempt used temp tables, second
attempt tried to use the name of the current temp schema as a unique
session id), I'm at my wits end, as I can't get this to work reliably
with Access and its linked tables...
I see that the log_line_prefix can be set to a Session ID (using
'%c'). Is there any way to get the current value of this from a
function in PG? (current_setting() simply returns the configuration
string, not its actual value.)
My troubles would be solved if I could reference a SessionID from
within PG. Any hope?
THANKS,
-Tom