Re: [COMMITTERS] pgsql-server: Clean up generation of default names

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: [COMMITTERS] pgsql-server: Clean up generation of default names
Дата
Msg-id 40C929E2.1060605@familyhealth.com.au
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql-server: Clean up generation of default names  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [COMMITTERS] pgsql-server: Clean up generation of default  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Список 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






В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [pgsql-hackers-win32] Tablespaces
Следующее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: [COMMITTERS] pgsql-server: Clean up generation of default