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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: system catalog relation of a table and a serial sequence
Дата
Msg-id 17678.1008476750@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: system catalog relation of a table and a serial sequence  (Brent Verner <brent@rcfile.org>)
Ответы Re: system catalog relation of a table and a serial sequence  (Brent Verner <brent@rcfile.org>)
Список pgsql-hackers
Brent Verner <brent@rcfile.org> writes:
> Why not use strtok?

Well, it's ugly (I don't like non-reentrant library routines), it's
not really buying anything, and I don't think you've got the corner
cases right anyway.  I'd go for something like

    if (strlen(adsrc) > 19 &&
        strncmp(adsrc, "nextval('\"", 10) == 0 &&
        strcmp(adsrc + strlen(adsrc) - 9, "\"'::text)") == 0)

            regards, tom lane

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

Предыдущее
От: Brent Verner
Дата:
Сообщение: 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