Re: system catalog relation of a table and a serial sequence

Поиск
Список
Период
Сортировка
От Brent Verner
Тема Re: system catalog relation of a table and a serial sequence
Дата
Msg-id 20011216113021.GA9061@rcfile.org
обсуждение исходный текст
Ответ на Re: system catalog relation of a table and a serial sequence  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: system catalog relation of a table and a serial sequence  (Brent Verner <brent@rcfile.org>)
Список pgsql-hackers
[2001-12-16 00:42] Tom Lane said:
| Brent Verner <brent@rcfile.org> writes:
| > How about strtok_r?  I /really/ like the fact that strtok will
| > eat either of the tokens ['"] that might be around the sequence
| > name... just call me lazy :-)
|
| That behavior creates one of the "corner cases" I was alluding to.
| Shall I leave the difficulty as an exercise for the student?

Ok... I ended up working longer than I'd thought :-)

* no strtok were used in this patch. ;-)
* Handles both serial-sequences and user-sequences referenced in
  nextval(...) default column defs.
* Loop over tables so we can check wildcard table name in the future
  per your suggestion.  I've only noted a TODO: regarding the wildcard
  matching.
* Instead of using a NULL terminated char** array to hold the collected
  sequence names, I put in a simple strarray ADT -- mostly so I could
  have the strarrayContains() test to call from the conditional around
  dumpSequence().  If this is just dumb, I'll replace it with a simple
  char** implementation.  Did I overlook some utility funcs in the
  PG source that already does this?  If so, I'll gladly use those.
* Patch is really attached :-P

comments?

tired.
  b

--
"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 по дате отправления:

Предыдущее
От: Andrew McMillan
Дата:
Сообщение: Re: [PATCHES] system catalog relation of a table and a
Следующее
От: mlw
Дата:
Сообщение: Explicit config patch 7.2B4