Re: [PATCHES] system catalog relation of a table and a serial sequence

Поиск
Список
Период
Сортировка
От Brent Verner
Тема Re: [PATCHES] system catalog relation of a table and a serial sequence
Дата
Msg-id 20011216040332.GB7161@rcfile.org
обсуждение исходный текст
Ответ на system catalog relation of a table and a serial sequence  (Brent Verner <brent@rcfile.org>)
Ответы Re: [PATCHES] system catalog relation of a table and a serial sequence  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
[2001-12-15 22:26] Rod Taylor said:
|
| > Brent Verner <brent@rcfile.org> writes:
| > > 1) Is a strcmp(firststrtok,"nextval('") == 0  sufficient to
| determine
| > >    that the adsrc is indeed one that we're looking for?  If not,
| > >    suggestions are greatly appreciated :-)
| >
| > I would not use strtok at all, but look for nextval('" at the start
| > of the string and "'::text) at the end.  If both match, and there's
| > at least one character between, then the intervening text can be
| > presumed to be a sequence name.  You might further check that the
| > apparent sequence name ends with _seq --- if not, it wasn't
| generated
| > by SERIAL.
|
| Wouldn't you want to include user sequences that are required for
| using the table?  If someone has used their own sequence as the
| default value for a column it would be nice to have it dumped as well.

This is my thought as well.  Hopefully Tom will concur.

cheers.
  brent

--
"Develop your talent, man, and leave the world something. Records are
really gifts from people. To think that an artist would love you enough
to share his music with anyone is a beautiful thing."  -- Duane Allman

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

Предыдущее
От: Brent Verner
Дата:
Сообщение: Re: system catalog relation of a table and a serial sequence
Следующее
От: Tom Lane
Дата:
Сообщение: Re: system catalog relation of a table and a serial sequence