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