From: | "Alessandro" <a(dot)zipoli(at)sdb(dot)it> |
---|---|
To: | <pgsql-novice(at)postgresql(dot)org> |
Subject: | About select |
Date: | 2002-04-08 13:58:35 |
Message-ID: | 00df01c1df05$7a089d60$5b7a760a@sdb.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hello,
I've a table "users" with columns id, login and sec_level, where the latter
contains an integer 1..3.
Each db user logs in with his username. Till today I left access to the
record (of another table "works") that had, in the column "requested_by",
the same name of the current db user, with
select id, id from works where requested_by = ".get_session("UserID")."
order by id desc
Now I'd like that users with sec_level 2 and 3 can access to all records in
works table. Can I do it with an unique instruction inserting Case.. when
controls? And how?.
Thanks a lot
A.
From | Date | Subject | |
---|---|---|---|
Next Message | Tim Wilson | 2002-04-08 16:18:20 | table vs. column constraints |
Previous Message | Tom Lane | 2002-04-05 20:06:59 | Re: Running out of Disk Space |