Re: [SQL] Permission to Select

2006-03-27 Thread Eugene E.
Markus Schaber wrote: Hi, Eugene, Eugene E. wrote: This means that some privileges are NOT INDEPENDENT. No, it means that the UPDATE operation needs both UPDATE and SELECT privileges. Markus thanx. I already clear this to me. ---(end of broadcast)

Re: [SQL] Permission to Select

2006-03-27 Thread Markus Schaber
Hi, Eugene, Eugene E. wrote: > This means that some privileges are NOT INDEPENDENT. No, it means that the UPDATE operation needs both UPDATE and SELECT privileges. Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against sof

Re: [SQL] Permission to Select -- I am wrong

2006-03-13 Thread Eugene E.
Eugene E. wrote: PFC wrote: What information can be retrieved from a structure by being able to update all rows? Write a plpgsql function snoop(x) which inserts x into a table 'log' created by you, and also returns x. UPDATE users SET password=snoop(password). Read log tab

Re: [SQL] Permission to Select

2006-03-13 Thread Eugene E.
PFC wrote: What information can be retrieved from a structure by being able to update all rows? Write a plpgsql function snoop(x) which inserts x into a table 'log' created by you, and also returns x. UPDATE users SET password=snoop(password). Read log table. Done. This

Re: [SQL] Permission to Select

2006-03-13 Thread Eugene E.
Tom Lane wrote: "Eugene E." <[EMAIL PROTECTED]> writes: db=# REVOKE all ON t FROM u; db=# GRANT update,insert,delete ON t TO u; db=# \c - u db=> INSERT INTO t VALUES (1,'x'); INSERT db=> UPDATE t SET a='y' WHERE i=1; ERROR: Permission denied for relation t; db=> UPDATE t SET a='y'; UPDATE

Re: [SQL] Permission to Select

2006-03-13 Thread PFC
What information can be retrieved from a structure by being able to update all rows? Write a plpgsql function snoop(x) which inserts x into a table 'log' created by you, and also returns x. UPDATE users SET password=snoop(password). Read log table. Done. If you h

Re: [SQL] Permission to Select

2006-03-13 Thread Tom Lane
"Eugene E." <[EMAIL PROTECTED]> writes: > db=# REVOKE all ON t FROM u; > db=# GRANT update,insert,delete ON t TO u; > db=# \c - u > db=> INSERT INTO t VALUES (1,'x'); > INSERT > db=> UPDATE t SET a='y' WHERE i=1; > ERROR: Permission denied for relation t; > db=> UPDATE t SET a='y'; > UPDATE This

Re: [SQL] Permission to Select

2006-03-13 Thread Rod Taylor
On Mon, 2006-03-13 at 10:46 -0400, Alvaro Herrera wrote: > Rod Taylor wrote: > > > By allowing the user a where clause you grant them select privileges. > > You will find that delete works the same way. > > > > This is one of those times when per column permissions are useful. You > > could grant

Re: [SQL] Permission to Select

2006-03-13 Thread Alvaro Herrera
Rod Taylor wrote: > By allowing the user a where clause you grant them select privileges. > You will find that delete works the same way. > > This is one of those times when per column permissions are useful. You > could grant them select access on the "name" column but not the "salary" > column.

Re: [SQL] Permission to Select

2006-03-13 Thread Rod Taylor
On Mon, 2006-03-13 at 12:51 +0300, Eugene E. wrote: > Hi all > the serious problem with permissions is encountered > > NOTE: the following example is really useful but there is no room to > describe it's use. > > > db=# CREATE USER u; > db=# CREATE TABLE t (i int, a text); > db=# REVOKE all ON

[SQL] Permission to Select

2006-03-13 Thread Eugene E.
Hi all the serious problem with permissions is encountered NOTE: the following example is really useful but there is no room to describe it's use. db=# CREATE USER u; db=# CREATE TABLE t (i int, a text); db=# REVOKE all ON t FROM u; db=# GRANT update,insert,delete ON t TO u; db=# \c - u db=>