Re: Column privileges and Hibernate (SOLVED)

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
Cc: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Column privileges and Hibernate (SOLVED)
Date: 2010-01-06 04:22:30
Message-ID: 20100106042230.GA17756@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

* Craig Ringer (craig(at)postnewspapers(dot)com(dot)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 values being changed, so even:
[excellent description cut]

This begs the question of if this is something PG should just allow
rather than denying the update. Can you clarify exactly what hibernate
does? Does it do:

#1: update x set col1 = col1 where pk = 'a';

Or does it do:

#2: update x set col1 = 'abc' where pk = 'a';

(where 'abc' happens to be the value of col1 in the database for
pk = 'a')?

It might be possible to ignore/optimize/whatever #1, perhaps, but
there's really nothing we could do about #2. If it's #1, do other
databases which support column-level privs ignore those, or do they deny
the update like PG does today?

Thanks,

Stephen

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2010-01-06 04:46:53 Re: Column privileges and Hibernate (SOLVED)
Previous Message Craig Ringer 2010-01-06 03:17:35 Re: Column privileges and Hibernate (SOLVED)