Re: not null constraints, again

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: not null constraints, again
Дата
Msg-id 202504161224.xedjghsndf7w@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: not null constraints, again  (Tender Wang <tndrwang@gmail.com>)
Список pgsql-hackers
On 2025-Apr-16, Tender Wang wrote:

> if (conForm->contype != CONSTRAINT_NOTNULL)
>     elog(ERROR, "constraint %u is not a not-null constraint", conForm->oid);
> 
> I feel that using conForm->conname is more friendly than oid for users.

Yeah, this doesn't really matter because this function would not be
called with any other kind of constraint anyway.  This test could just
as well be an Assert() ... I was pretty torn about that choice TBH (I
still am).

> Others look good for me.

Thanks for looking!

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"No renuncies a nada. No te aferres a nada."



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