get SYSID of current user as var for query

From: google(at)itrex(dot)de (Simon Heinrich)
To: pgsql-general(at)postgresql(dot)org
Subject: get SYSID of current user as var for query
Date: 2003-05-21 09:18:42
Message-ID: 3849957c.0305210118.39f5a153@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi I`m nearly new to Postgres and like to do something like that in a
query:

select * from testtab where user=SYSID;

Ilike to use the SYSID of current user as var for the query.

The reson:
Sometimes I have to build a table whith a "createdby"-Stamp. Until all
persons in a company never leave or change there job thats no
problem...but when they do I have to update all tables where I used
"createdby=user". If I coud use the ID I just change the name of the
user instad of creating a new one.

cu Simon

Browse pgsql-general by date

  From Date Subject
Next Message Nigel J. Andrews 2003-05-21 09:58:26 Re: SELECT DISTINCT ON bug?
Previous Message Jean-Christian Imbeault 2003-05-21 09:17:02 Re: SELECT DISTINCT ON bug?