Re: using index or check in ALTER TABLE SET NOT NULL

From: Sergei Kornilov <sk(at)zsrv(dot)org>
To: Ildar Musin <i(dot)musin(at)postgrespro(dot)ru>, Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: using index or check in ALTER TABLE SET NOT NULL
Date: 2018-03-06 13:12:31
Message-ID: 611431520341951@web57o.yandex.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello
thank you for review!

> Adding check constraint will also force the full table scan. So I think
> it would be better to rephrased it as follows:
Agree. I updated docs in new attached patch slightly different

> Regarding regression tests it may be useful to set client_min_messages
> to 'debug1' before setting "NOT NULL" attribute for a column. In this
> case you can tell for sure that NotNullImpliedByRelConstraints()
> returned true (i.e. your code actually did the job) as the special debug
> message is printed to the log.
I can not find any debug messages in tests: grep client_min_messages -irn src/test/ Only some warning level and few error. So i verify in regression tests only top-level behavior.
Or this paragraph was for other people, not for tests?

regards, Sergei

Attachment Content-Type Size
alter_table_set_not_null_by_constraints_only_v5.patch text/x-diff 13.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2018-03-06 13:18:40 Re: pgbench - allow to specify scale as a size
Previous Message Petr Jelinek 2018-03-06 13:12:04 Re: BUGFIX: standby disconnect can corrupt serialized reorder buffers