Re: cataloguing NOT NULL constraints

Поиск
Список
Период
Сортировка
От Zhihong Yu
Тема Re: cataloguing NOT NULL constraints
Дата
Msg-id CALNJ-vTdsYpb_21K9NhbFe4Y+oCfvRebm46aBHw3ktpZ9PcHdQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: cataloguing NOT NULL constraints  (Zhihong Yu <zyu@yugabyte.com>)
Список pgsql-hackers
Hi,
w.r.t. the while loop in findNotNullConstraintAttnum():

+       if (multiple == NULL)
+           break;

I think `pfree(arr)` should be called before breaking.

+       if (constraint->cooked_expr != NULL)
+           return tryExtractNotNullFromNode(stringToNode(constraint->cooked_expr), rel);
+       else
+           return tryExtractNotNullFromNode(constraint->raw_expr, rel);

nit: the `else` keyword is not needed.

+   if (isnull)
+       elog(ERROR, "null conbin for constraint %u", conForm->oid);

It would be better to expand `conbin` so that the user can better understand the error.

Cheers

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

Предыдущее
От: Melih Mutlu
Дата:
Сообщение: Re: Summary function for pg_buffercache
Следующее
От: andrey.arapov@nixaid.com
Дата:
Сообщение: [PATCH] initdb: do not exit after warn_on_mount_point