Re: force_not_null option support for file_fdw

Поиск
Список
Период
Сортировка
От Shigeru Hanada
Тема Re: force_not_null option support for file_fdw
Дата
Msg-id 4E699DE6.8010606@gmail.com
обсуждение исходный текст
Ответ на Re: force_not_null option support for file_fdw  (Kohei Kaigai <Kohei.Kaigai@EMEA.NEC.COM>)
Ответы Re: force_not_null option support for file_fdw
Re: force_not_null option support for file_fdw
Список pgsql-hackers
Thanks for the review, Kaigai-san.

(2011/09/09 0:47), Kohei Kaigai wrote:
> I found one other point to be fixed:
> On get_force_not_null(), it makes a list of attribute names with force_not_null option.
>
> +       foreach (cell, options)
> +       {
> +           DefElem    *def = (DefElem *) lfirst(cell);
> +           const char *value = defGetString(def);
> +
> +           if (strcmp(def->defname, "force_not_null") == 0&&
> +               strcmp(value, "true") == 0)
> +           {
> +               columns = lappend(columns, makeString(NameStr(attr->attname)));
> +               elog(DEBUG1, "%s: force_not_null", NameStr(attr->attname));
> +           }
> +
> +       }
>
> makeString() does not copy the supplied string itself, so it is not preferable to reference
> NameStr(attr->attname) across ReleaseSysCache().
> I'd like to suggest to supply a copied attname using pstrdup for makeString

Oops, fixed.
[ I should check some of my projects for this issue... ]

Attached patch also includes some cosmetic changes such as removing
useless blank lines.

Regards,
--
Shigeru Hanada

Вложения

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

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: pg_last_xact_insert_timestamp
Следующее
От: Pavel Golub
Дата:
Сообщение: Re: pg_dump.c