From: darcy@druid.net
To: ateo@labsd.inf.utfsm.cl
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] Current User
Date: Thu, 12 Nov 1998 19:12:45 -0500 (EST)
Message-ID: <m0ze6qz-0000eRC@druid.net> (raw)
In-Reply-To: <199811112331.UAA12693@rauli.labsd.inf.utfsm.cl>
Thus spake Jorge Maturana
> I want to have a table to manage a register of the modifications made to
> several tables by a group of users, that table should contain the name of the
> postgres user that made the modificaction, now, How can I get the name (or
> the user id) of the current user logged in?,there are some "pg_currentuser"
> table to make a select?
Look at insert_username in contrib/spi. Basically you create a trigger
on insert.
--
D'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 424 2871 (DoD#0082) (eNTP) | what's for dinner.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: darcy@druid.net, ateo@labsd.inf.utfsm.cl
Subject: Re: [SQL] Current User
In-Reply-To: <m0ze6qz-0000eRC@druid.net>
References: <199811112331.UAA12693@rauli.labsd.inf.utfsm.cl> <m0ze6qz-0000eRC@druid.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox