Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 5F7F11B505EE for ; Wed, 14 Mar 2012 09:39:23 -0300 (ADT) Received: from eu1sys200aog107.obsmtp.com ([207.126.144.123]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1S7nU8-0007KV-2K for pgsql-admin@postgresql.org; Wed, 14 Mar 2012 12:39:22 +0000 Received: from mail-lpp01m010-f50.google.com ([209.85.215.50]) (using TLSv1) by eu1sys200aob107.postini.com ([207.126.147.11]) with SMTP ID DSNKT2CRahsYWFGcXL/ZlUgsP995vwSsWobG@postini.com; Wed, 14 Mar 2012 12:39:20 UTC Received: by mail-lpp01m010-f50.google.com with SMTP id m13so1454460lah.9 for ; Wed, 14 Mar 2012 05:39:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:references:in-reply-to:mime-version:x-mailer:thread-index:date :message-id:subject:to:content-type:content-transfer-encoding :x-gm-message-state; bh=HLnR1emsX0NKHKmFM0iu5I2Kcjz75oxSnqPrUpcgIvA=; b=eP5QRDCMpV+3vzjdejk6w9zaI1W8MRXauupA1Ul3EIf9JdI8d5I4MXuLCuVVbYzfUT JgphFnxcfuLN3y6qw0YdQwhOEOeHcCdwJZVsQ1zyTbQo8PzGZE6oMJron94YtG6TJJrV O4vyYW4BNQl2KWb5NTo+ysbYysqboZoDCSVOQXArbE6wNJxQ3jJ2E93UG+p7w99wP7jV KubRxJU24fKKmdYceDE3ir42JYJA6M++bXvhs0CAToXcvOj5M5M4VUXCr9eYWQtDjPOR 1KQyARqChXirmMy/GE6tLPac5m9mEtNnfNm3w/bUOFhORkm4WFn6q/3U5sih8J/lNCdM XZyA== Received: by 10.152.147.1 with SMTP id tg1mr1810304lab.22.1331728746239; Wed, 14 Mar 2012 05:39:06 -0700 (PDT) From: Khangelani Gama References: <8ecc4155e8754edef35e260a60a4a8db@mail.gmail.com> <1331722455.5503.166.camel@elliot> 98bfa47ff4bb6e222e89f751bbcbf4a7@mail.gmail.com In-Reply-To: 98bfa47ff4bb6e222e89f751bbcbf4a7@mail.gmail.com MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 thread-index: AQJFQLz6M2+e8WhTokLoOFqQznw03wGG5jUnlWztHmCAABjIEA== Date: Wed, 14 Mar 2012 14:39:36 +0200 Message-ID: Subject: Re: Update actions (with user name) inside PostgreSQL DB - any version on postgreSQL To: pgsql-admin@postgresql.org Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQmq4Y6xFzJtXTX63VSeaWhdWrYl+inoCLMeeMB1i8Okmq+sZny8kGr5W14SYDEAYP6VtpSY X-Pg-Spam-Score: -4.2 (----) X-Archive-Number: 201203/79 X-Sequence-Number: 39267 Hi, anyone with an idea based on my latest comments below? Thanks -----Original Message----- From: Khangelani Gama [mailto:kgama@argility.com] Sent: Wednesday, March 14, 2012 1:25 PM To: 'Robin Iddon'; 'pgsql-admin@postgresql.org' Subject: RE: [ADMIN] Update actions (with user name) inside PostgreSQL DB - any version on postgreSQL thanks, the issue we have is that we have many Linux users having root access into the system. So they're able to access the DB by just going in a= s "su - superusername". If this user is able to make any updates inside the database it might create problems. Auditors wants PostgreSQL to tell who updated what inside the database besides client users that access the database from outside using some applications. So this common "superusername" doesn't tell the actual person who got into the system and went onto make updates inside the database because they first logged as their linux users before as going in as postgres user called "superusername". -----Original Message----- From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Robin Iddon Sent: Wednesday, March 14, 2012 12:54 PM To: pgsql-admin@postgresql.org Subject: Re: [ADMIN] Update actions (with user name) inside PostgreSQL DB - any version on postgreSQL What do you want to have happen to the timestamp/user? You can obviously do: update test set t4 =3D 9, user =3D , timestamp =3D where t1 =3D 001; I'm assuming you're trying to store the user and timestamp somewhere else, though? Robin On Wed, 2012-03-14 at 12:44 +0200, Khangelani Gama wrote: > > > Hi > > > > > > Is it possible to have an update query that will specify actions, > timestamp, user who=92s making the update inside the database. Can this > be done without any script but just in the transaction block > > > > Example: > > > > dbtest=3D# UPDATE table test set t4 =3D 9 where t1 =3D 001 then specify > user_name, timestamp() ; > > > > > > > > > > Thanks in advance > > > > > > > > > > > > > > C O N F I D E N T I A L I T Y N O T I C E > The contents of and attachments to this e-mail are intended for the > addressee only, and may contain the confidential information of > Argility (Proprietary) Limited and/or its subsidiaries. Any review, > use or dissemination thereof by anyone other than the intended > addressee is prohibited. If you are not the intended addressee please > notify the writer immediately and destroy the e-mail. Argility > (Proprietary) Limited and its subsidiaries distance themselves from > and accept no liability for unauthorised use of their e-mail > facilities or e-mails sent other than strictly for business purposes. > > > > > > > > CONFIDENTIALITY NOTICE > The contents of and attachments to this e-mail are intended for the > addressee only, and may contain the confidential information of Argility > (Proprietary) Limited and/or its subsidiaries. Any review, use or > dissemination thereof by anyone other than the intended addressee is > prohibited. > If you are not the intended addressee please notify the writer immediatel= y > and destroy the e-mail. Argility (Proprietary) Limited and its > subsidiaries distance themselves from and accept no liability for > unauthorised use of their e-mail facilities or e-mails sent other than > strictly for business purposes. -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin CONFIDENTIALITY NOTICE The contents of and attachments to this e-mail are intended for the addre= ssee only, and may contain the confidential information of Argility (Prop= rietary) Limited and/or its subsidiaries. Any review, use or disseminatio= n thereof by anyone other than the intended addressee is prohibited. If you are not the intended addressee please notify the writer immediatel= y and destroy the e-mail. Argility (Proprietary) Limited and its subsidia= ries distance themselves from and accept no liability for unauthorised us= e of their e-mail facilities or e-mails sent other than strictly for busi= ness purposes. =0D