From: Herb Blacker <herbblacker@isgenesis.com>
To: pgsql-novice@postgresql.org
Subject: Loading current_user and current_timestamp using COPY
Date: Tue, 09 Oct 2001 10:09:21 -0500
Message-ID: <3BC31321.1000807@isgenesis.com> (raw)
I'm trying to load the current_user and current timestamp (as an audit)
in a set of data using the COPY FROM... statement.
I cannot get the session_user, current_user or user to give me anything
but the text itself...I even tried the obsolete getpgusername() and
thats exactly what it entered!
To get the current_timestamp, I had to use the now() function.
The declaration for the fields is:
.
.
updateUserId text DEFAULT current_user,
updateTimestamp timestamp DEFAULT current_timestamp,
.
Am I doing something wrong?
Thanks in advance,
--
Herb Blacker
Database Administrator
ReCare, Inc.
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: herbblacker@isgenesis.com, pgsql-novice@postgresql.org
Subject: Re: Loading current_user and current_timestamp using COPY
In-Reply-To: <3BC31321.1000807@isgenesis.com>
* 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