get SYSID of current user as var for query - Mailing list pgsql-general

From google@itrex.de (Simon Heinrich)
Subject get SYSID of current user as var for query
Date
Msg-id 3849957c.0305210118.39f5a153@posting.google.com
Whole thread Raw
List 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

pgsql-general by date:

Previous
From: "Stefano Vita Finzi"
Date:
Subject: plpgsql recursion
Next
From: "Ben Joyce"
Date:
Subject: pg newbie stumped on sequences!