pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpg-migrator - pg_migrator: Update TODO.
2+ messages / 2 participants
[nested] [flat]
* pg-migrator - pg_migrator: Update TODO.
@ 2009-06-01 14:33 User Bmomjian <bmomjian@pgfoundry.org>
0 siblings, 0 replies; 2+ messages in thread
From: bmomjian@pgfoundry.org @ 2009-06-01 14:33 UTC (permalink / raw)
To: pgsql-committers
Log Message:
-----------
Update TODO.
Modified Files:
--------------
pg_migrator:
TODO (r1.13 -> r1.14)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pg-migrator/pg_migrator/TODO?r1=1.13&r2=1.14)
^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix ALTER DOMAIN NOT NULL syntax
@ 2024-04-15 06:39 Peter Eisentraut <peter@eisentraut.org>
0 siblings, 0 replies; 2+ messages in thread
From: Peter Eisentraut @ 2024-04-15 06:39 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Fix ALTER DOMAIN NOT NULL syntax
This addresses a few problems with commit e5da0fe3c22 ("Catalog domain
not-null constraints").
In CREATE DOMAIN, a NOT NULL constraint looks like
CREATE DOMAIN d1 AS int [ CONSTRAINT conname ] NOT NULL
(Before e5da0fe3c22, the constraint name was accepted but ignored.)
But in ALTER DOMAIN, a NOT NULL constraint looks like
ALTER DOMAIN d1 ADD [ CONSTRAINT conname ] NOT NULL VALUE
where VALUE is where for a table constraint the column name would be.
(This works as of e5da0fe3c22. Before e5da0fe3c22, this syntax
resulted in an internal error.)
But for domains, this latter syntax is confusing and needlessly
inconsistent between CREATE and ALTER. So this changes it to just
ALTER DOMAIN d1 ADD [ CONSTRAINT conname ] NOT NULL
(None of these syntaxes are per SQL standard; we are just living with
the bits of inconsistency that have built up over time.)
In passing, this also changes the psql \dD output to not show not-null
constraints in the column "Check", since it's already shown in the
column "Nullable". This has also been off since e5da0fe3c22.
Reviewed-by: jian he <jian.universality@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/9ec24d7b-633d-463a-84c6-7acff769c9e8%40eisentraut.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/9895b35cb88edc30b836661dbc26d7665716b5a0
Modified Files
--------------
doc/src/sgml/ref/create_domain.sgml | 17 ++++++++--
src/backend/parser/gram.y | 60 ++++++++++++++++++++++++++++++++++--
src/backend/utils/adt/ruleutils.c | 2 +-
src/bin/psql/describe.c | 2 +-
src/test/regress/expected/domain.out | 22 ++++++++++---
src/test/regress/sql/domain.sql | 12 +++++---
6 files changed, 99 insertions(+), 16 deletions(-)
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2024-04-15 06:39 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-06-01 14:33 pg-migrator - pg_migrator: Update TODO. User Bmomjian <bmomjian@pgfoundry.org>
2024-04-15 06:39 pgsql: Fix ALTER DOMAIN NOT NULL syntax Peter Eisentraut <peter@eisentraut.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox