From: | "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu> |
---|---|
To: | Matthew Horoschun <mhoroschun(at)canprint(dot)com(dot)au>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Controlling access to Sequences |
Date: | 2003-02-01 23:42:03 |
Message-ID: | 20030201234203.GB1300@wallace.ece.rice.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Sat, Feb 01, 2003 at 12:39:50AM -0600, Bruno Wolff III wrote:
> On Fri, Jan 31, 2003 at 23:47:27 +1100,
> Matthew Horoschun <mhoroschun(at)canprint(dot)com(dot)au> wrote:
> >
> > Is there any effective method for controlling access to a SEQUENCE? or
> > should I do something like in the view:
>
> You can limit access to nextval by only allowing access through a user
> defined function that runs as the definer. If you only want them to use
> the function when doing an insert into a specific table, then I am not
> sure if you can do this easily. At worst you could write a function
> that does the insert.
Define your 'suid_nextval()' as Bruno suggests, then instead of using the
'serial' convience type, define your own that uses your function as the
default, rather than nextval().
Ross
From | Date | Subject | |
---|---|---|---|
Next Message | Ross J. Reedstrom | 2003-02-02 07:16:03 | Re: how can i convert a substring to a date? |
Previous Message | Bruno Wolff III | 2003-02-01 14:54:12 | Re: update and IN vs. EXISTS |