Re: pg_settings.enumval as array

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_settings.enumval as array
Дата
Msg-id 10015.1227290340@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pg_settings.enumval as array  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: pg_settings.enumval as array  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-hackers
Magnus Hagander <magnus@hagander.net> writes:
> The attached patch changes pg_settings.enumval to be an array of text
> instead of just a string, per previous discussion and the open items list.

> Comments?

Hmmm ... this coding will fail if any enumval contains a double quote.
Which is probably not a big problem, but we ought to document the
restriction somewhere.

Also, this:

> !     if (len > strlen(separator)-1)
> !         /* Replace final separator */
> !         hintmsg[len-strlen(separator)] = '\0';

would read better IMHO as "if (len >= strlen(separator))".

Also, the output datatype should be text[] not cstring[].

Otherwise seems okay.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: Silence compiler warning about ignored return value.
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: fmgr.h vs funcapi.h?