Re: Getting linux $USER (and perhaps other env vars) in PL/pg-sql?

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: Getting linux $USER (and perhaps other env vars) in PL/pg-sql?
Дата
Msg-id 20090807193807.GS5407@samason.me.uk
обсуждение исходный текст
Ответ на Getting linux $USER (and perhaps other env vars) in PL/pg-sql?  ("Gauthier, Dave" <dave.gauthier@intel.com>)
Список pgsql-general
On Fri, Aug 07, 2009 at 12:08:45PM -0700, Gauthier, Dave wrote:
> Running 8.3.4 on Linux.
>
> From inside a stored procedure, is there a way to capture the linux
> user (environment var = $USER) that is attached to the DB?

Not really, what if they were connecting over the network from a device
that doesn't have "users"?

Maybe the "current_user" variable[1] helps?

--
  Sam  http://samason.me.uk/

 [1] http://www.postgresql.org/docs/current/static/functions-info.html

В списке pgsql-general по дате отправления:

Предыдущее
От: "Gauthier, Dave"
Дата:
Сообщение: Getting linux $USER (and perhaps other env vars) in PL/pg-sql?
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: Postgresql Backups