On Wed, Feb 7, 2024 at 4:11 PM Peter Eisentraut <[email protected]> wrote:
>
> >
> > Interesting. I couldn't reproduce this locally, even across different
> > operating systems. The cfbot failures appear to be sporadic, but also
> > happening across multiple systems, so it's clearly not just a local
> > environment failure. Can anyone else perhaps reproduce this locally?
>
> This patch set needed a rebase, so here it is.
>
do you think
add following
ALTER DOMAIN <replaceable class="parameter">name</replaceable> ADD NOT
NULL VALUE
to doc/src/sgml/ref/alter_domain.sgml synopsis makes sense?
otherwise it would be hard to find out this command, i think.
I think I found a bug.
connotnull already set to not null.
every execution of `alter domain connotnull add not null value ;`
would concatenate 'NOT NULL VALUE' for the "Check" column,
That means changes in the function pg_get_constraintdef_worker are not
100% correct.
see below demo:
src8=# \dD+
List of domains
Schema | Name | Type | Collation | Nullable | Default |
Check | Access privileges | Description
--------+------------+---------+-----------+----------+---------+----------------+-------------------+-------------
public | connotnull | integer | | | | NOT
NULL VALUE | |
public | nnint | integer | | not null | | NOT
NULL VALUE | |
(2 rows)
src8=# alter domain connotnull add not null value ;
ALTER DOMAIN
src8=# \dD+
List of domains
Schema | Name | Type | Collation | Nullable | Default |
Check | Access privileges | Descript
ion
--------+------------+---------+-----------+----------+---------+-------------------------------+-------------------+---------
----
public | connotnull | integer | | not null | | NOT
NULL VALUE NOT NULL VALUE | |
public | nnint | integer | | not null | | NOT
NULL VALUE | |
(2 rows)
src8=# alter domain connotnull add not null value ;
ALTER DOMAIN
src8=# \dD+
List of domains
Schema | Name | Type | Collation | Nullable | Default |
Check | Access privil
eges | Description
--------+------------+---------+-----------+----------+---------+----------------------------------------------+--------------
-----+-------------
public | connotnull | integer | | not null | | NOT
NULL VALUE NOT NULL VALUE NOT NULL VALUE |
|
public | nnint | integer | | not null | | NOT
NULL VALUE |
|
(2 rows)