From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Rick Delaney <rick(at)consumercontact(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Accessing serials through rules |
Date: | 2001-03-20 03:27:22 |
Message-ID: | 9419.985058842@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Rick Delaney <rick(at)consumercontact(dot)com> writes:
> With rules, I can allow people to insert into a table that they don't
> otherwise have access to. And default values seem to get inserted fine
> except when the field is type serial (and the default is from a
> sequence). Then you get write permission errors on the associated
> sequence. Should it be like this?
Probably not, but I don't see any reasonable way to fix it at the
moment. The sequence function's access to the sequence isn't part
of the rule's rangetable and so is not subject to the permission
adjustments that happen for the rule. More generally, an SQL or PLPGSQL
function invoked by a rule would also be executed with the current
user's permissions, not the rule owner's. That might or might not be
what you want, but in any case it's quite difficult to change.
We need a rather thoroughgoing redesign of the permissions mechanism
in Postgres, and I guess this is something we'll need to consider when
that happens.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | will trillich | 2001-03-20 05:53:19 | Re: pg_description usage pointers? |
Previous Message | Bruce Momjian | 2001-03-20 02:50:20 | Re: pg_description usage pointers? |