From: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [COMMITTERS] pgsql-server: Clean up generation of default names |
Date: | 2004-06-11 03:41:22 |
Message-ID: | 40C929E2.1060605@familyhealth.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
> Yeah, I know ... we ought to find some way around that, but I dunno
> what yet ...
My idea, which I tried hacking, but gave up was to do the following:
1. Extend this command:
ALTER SEQUENCE seqname RESTART WITH 17;
to allow:
ALTER SEQUENCE ON table(col) RESTART WITH 17...
or
ALTER SEQUENCE ON table.col RESTART WITH 17...
2. Overload nextval, curval and setval:
SELECT SETVAL('"schema.table"', 'col', 17, false);
3. Or even create a pg_get_sequence() function:
SELECT SETVAL(pg_get_sequence(schema.table, col), 17);
etc.
Chris
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-06-11 03:48:42 | pgsql-server: This patch updates pgpipe() on win32 to log exactly which |
Previous Message | Tom Lane | 2004-06-11 03:15:31 | Re: [COMMITTERS] pgsql-server: Clean up generation of default names |
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Kings-Lynne | 2004-06-11 04:02:21 | Re: [COMMITTERS] pgsql-server: Clean up generation of default |
Previous Message | Bruce Momjian | 2004-06-11 03:40:37 | Re: Compiling libpq with VisualC |