| From: | Neil Conway <neilc(at)samurai(dot)com> |
|---|---|
| To: | Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org> |
| Cc: | pgsql-patches(at)postgresql(dot)org |
| Subject: | Re: lastval() |
| Date: | 2005-06-07 04:15:07 |
| Message-ID: | 42A51F4B.6090505@samurai.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers pgsql-patches |
Neil Conway wrote:
> If you're busy, I can clean this up and apply it.
Attached is a revised patch. Per subsequent discussion, I stuck with
your approach of keeping a pointer to the sequence object, rather than
just the last int64 produced by nextval(). That means we emit an error on:
CREATE SEQUENCE seq;
SELECT nextval('seq');
DROP SEQUENCE seq;
SELECT lastval();
It also means that setval() _does_ affect lastval(), and that we do
permission checks properly. Barring any objections I'll apply this later
tonight or tomorrow.
BTW, I noticed that the "permission denied" messages throughout the
source don't quote the name of the identifier for which permission has
been denied. This violates the error code conventions: "Use quotes
always to delimit file names, user-supplied identifiers, and other
variables that might contain words." Is there a reason for this?
-Neil
| Attachment | Content-Type | Size |
|---|---|---|
| pg-lastval-3.patch | text/x-patch | 10.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2005-06-07 04:42:38 | Re: libpq API incompatibility between 7.4 and 8.0 |
| Previous Message | Bruce Momjian | 2005-06-07 03:21:32 | Re: Should *.backup files ever be removed from pg_xlog? |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2005-06-07 04:36:41 | Re: using strxfrm for having multi locale/please vote for |
| Previous Message | Euler Taveira de Oliveira | 2005-06-07 03:50:03 | Re: uptime function to postmaster |