Re: database session variables
От | Mark Wilson |
---|---|
Тема | Re: database session variables |
Дата | |
Msg-id | 003301c269b5$dc10f0d0$3301a8c0@merl обсуждение исходный текст |
Ответ на | database session variables ("Mark Wilson" <mark@mediasculpt.com>) |
Ответы |
Re: database session variables
Re: database session variables |
Список | pgsql-general |
Thanks Martijin, It sounds like the process_id is the 'correct' name for what I was calling session_id, and is what I want. To answer your question, Oracle lets you have session specific variables, via package variables. Now the next step is how to get access to process_id. I am currently running PostgreSQL version 7.2.1. "select procpid from pg_stat_activity;" seems to return information for all sessions (or 'processes'). Is backend_pid() or pg_stat_get_backend_pid() the correct call? Neither of them seem to exist in my database. If they are correct, how do I install them? Thanks in advance, Mark ----- Original Message ----- From: "Martijn van Oosterhout" <kleptog@svana.org> To: "Mark Wilson" <mark@mediasculpt.com> Cc: <pgsql-general@postgresql.org> Sent: Wednesday, October 02, 2002 11:49 AM Subject: Re: [GENERAL] database session variables > On Wed, Oct 02, 2002 at 10:27:10AM +1200, Mark Wilson wrote: > > Hi all, > > > > I am working on a system architecture that requires accessing session > > variables specific to the database connection. This is useful because you > > can emulate many users (with different privileges) with a single database > > logon. Currently it seems like only user, current_user and session_user > > are supported. > > Well, you can get the process ID of the backend process. This would be > different for every connection. > > What other database allow you to store session specific variables? > -- > Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > > There are 10 kinds of people in the world, those that can do binary > > arithmetic and those that can't. > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > >
В списке pgsql-general по дате отправления: