From: Tom Lane <tgl@sss.pgh.pa.us>
To: Matthew Horoschun <mhoroschun@canprint.com.au>
Cc: pgsql-sql@postgresql.org
Subject: Re: Controlling access to Sequences
Date: Fri, 31 Jan 2003 23:43:22 -0500
Message-ID: <4328.1044074602@sss.pgh.pa.us> (raw)
In-Reply-To: <8BB55A7D-359D-11D7-92E5-000393B3A702@canprint.com.au>
References: <8BB55A7D-359D-11D7-92E5-000393B3A702@canprint.com.au>
Matthew Horoschun <mhoroschun@canprint.com.au> writes:
> Should I just avoid SEQUENCES altogether and use the OIDs under normal
> circumstances and the MAX( id ) + 1 style thing when I need a
> human-usable number?
I don't think so. MAX()+1 has more than enough problems of its own.
The real bottom line here is that you should not allow untrustworthy
users any sort of direct access to SQL commands of any kind. They
should only be allowed access to an application that issues suitably
restricted SQL commands on their behalf.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, mhoroschun@canprint.com.au
Subject: Re: Controlling access to Sequences
In-Reply-To: <4328.1044074602@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox