Re: [GENERAL] Column Privileges: NULL instead of permission denied

2011-09-20 Thread Matthew Hawn
> From: Stephen Frost [mailto:sfr...@snowman.net] > > * Matthew Hawn (matth...@donaanacounty.org) wrote: > > I have a table with privileged data that is restricted using column > level > > permissions. I would like to have single query that returns data > from the > > table. If the user has per

Re: [GENERAL] Column Privileges: NULL instead of permission denied

2011-09-20 Thread Harald Fuchs
In article , Matthew Hawn writes: > I have a table with privileged data that is restricted using column level > permissions. I would like to have single query that returns data from > the table. If the user has permission, it should return the data but > return NULL if the user does not have p

Re: [GENERAL] Column Privileges: NULL instead of permission denied

2011-09-19 Thread Stephen Frost
* Matthew Hawn (matth...@donaanacounty.org) wrote: > I have a table with privileged data that is restricted using column level > permissions. I would like to have single query that returns data from the > table. If the user has permission, it should return the data but return > NULL if the user

[GENERAL] Column Privileges: NULL instead of permission denied

2011-09-19 Thread Matthew Hawn
I have a table with privileged data that is restricted using column level permissions. I would like to have single query that returns data from the table. If the user has permission, it should return the data but return NULL if the user does not have permission. I do not want to create separat

Re: [GENERAL] Column privileges and Hibernate (SOLVED)

2010-01-05 Thread Tom Lane
Stephen Frost writes: > This begs the question of if this is something PG should just allow > rather than denying the update. AFAICT, throwing a permissions error for "UPDATE SET foo = foo" is required by the SQL standard. There's nothing in there about "it's okay depending on what you assign to

Re: [GENERAL] Column privileges and Hibernate (SOLVED)

2010-01-05 Thread Craig Ringer
Stephen Frost wrote: > * Craig Ringer (cr...@postnewspapers.com.au) wrote: >> The issue with column privs is that Hibernate lists all columns, even >> ones it hasn't set or altered, in the INSERT and UPDATE statements it >> issues. Column privileges are checked based on the INSERT or UPDATE >> colu

Re: [GENERAL] Column privileges and Hibernate (SOLVED)

2010-01-05 Thread Stephen Frost
* Craig Ringer (cr...@postnewspapers.com.au) wrote: > The issue with column privs is that Hibernate lists all columns, even > ones it hasn't set or altered, in the INSERT and UPDATE statements it > issues. Column privileges are checked based on the INSERT or UPDATE > column list, not the actual val

Re: [GENERAL] Column privileges and Hibernate (SOLVED)

2010-01-05 Thread Craig Ringer
Craig Ringer wrote: > One of the apps using the database uses the Hibernate ORM system for > Java. While excellent in most ways, it's giving me some trouble when it > comes to inserts/updates on tables with column privileges. > > It's easy enough to tell Hibernate that certain columns are not > in

Re: [GENERAL] Column privileges and Hibernate

2009-12-16 Thread Craig Ringer
On 16/12/2009 5:06 PM, Willy-Bas Loos wrote: Do you mean that you use the postgresql role system as authentication and authorization mechanism in your app through hibernate? Correct. Actually I make a plain 'ol JDBC connection with the user-supplied credentials to test the user's auth and do

Re: [GENERAL] Column privileges and Hibernate

2009-12-16 Thread Willy-Bas Loos
Hi Craig, Do you mean that you use the postgresql role system as authentication and authorization mechanism in your app through hibernate? I don't understand how that should work. How do you authenticate? As far as i know, the way to achieve what you want is through an authorization layer on top

[GENERAL] Column privileges and Hibernate

2009-12-13 Thread Craig Ringer
Hi folks Now that column privileges are supported (fantastic!), I've been looking at replacing some of my unpleasantly verbose (and probably error-prone) trigger code that's responsible for limiting which roles can modify which columns in some tables. I've run into a bit of a roadblock, and I'm w

Re: [GENERAL] column privileges

2006-10-09 Thread Tom Lane
John DeSoi <[EMAIL PROTECTED]> writes: > On Oct 9, 2006, at 5:51 AM, Tjibbe Rijpma wrote: >> In postgresql privileges on colums is not possible, but is there a >> reason why not? > No one has volunteered to implement it? There is/was someone working on it, but we've not seen results yet. Check

Re: [GENERAL] column privileges

2006-10-09 Thread John DeSoi
On Oct 9, 2006, at 5:51 AM, Tjibbe Rijpma wrote: In postgresql privileges on colums is not possible, but is there a reason why not? No one has volunteered to implement it? I don't think it is a technical reason. For my application I want the option to hide some columns for some users

[GENERAL] column privileges

2006-10-09 Thread Tjibbe Rijpma
In postgresql privileges on colums is not possible, but is there a reason why not?   For my application I want the option to hide some columns for some users. So I use functions that make views for each user. Another solution may be to make a new table with a foreign key and an 1 to 1 relati