get SYSID of current user as var for query

Поиск
Список
Период
Сортировка
От google@itrex.de (Simon Heinrich)
Тема get SYSID of current user as var for query
Дата
Msg-id 3849957c.0305210118.39f5a153@posting.google.com
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: "Stefano Vita Finzi"
Дата:
Сообщение: plpgsql recursion
Следующее
От: "Ben Joyce"
Дата:
Сообщение: pg newbie stumped on sequences!