pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg-migrator - pg_migrator: More _dosmaperr fixes.
2+ messages / 2 participants
[nested] [flat]

* pg-migrator - pg_migrator: More _dosmaperr fixes.
@ 2009-06-01 21:37  User Bmomjian <bmomjian@pgfoundry.org>
  0 siblings, 0 replies; 2+ messages in thread

From: bmomjian@pgfoundry.org @ 2009-06-01 21:37 UTC (permalink / raw)
  To: pgsql-committers

Log Message:
-----------
More _dosmaperr fixes.

Modified Files:
--------------
    pg_migrator/src:
        file.c (r1.18 -> r1.19)
        (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pg-migrator/pg_migrator/src/file.c?r1=1.18&r2=1.19)




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: ATTACH PARTITION: Don't match a PK with a UNIQUE constraint
@ 2024-04-15 13:08  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Alvaro Herrera @ 2024-04-15 13:08 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

ATTACH PARTITION: Don't match a PK with a UNIQUE constraint

When matching constraints in AttachPartitionEnsureIndexes() we weren't
testing the constraint type, which could make a UNIQUE key lacking a
not-null constraint incorrectly satisfy a primary key requirement.  Fix
this by testing that the constraint types match.  (Other possible
mismatches are verified by comparing index properties.)

Discussion: https://postgr.es/m/202402051447.wimb4xmtiiyb@alvherre.pgsql

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/cee8db3f680b737b64d747530b48d30828cf4790

Modified Files
--------------
src/backend/commands/tablecmds.c          |  5 +++++
src/backend/utils/cache/lsyscache.c       | 22 ++++++++++++++++++++++
src/include/utils/lsyscache.h             |  2 ++
src/test/regress/expected/constraints.out | 16 ++++++++++++++++
src/test/regress/sql/constraints.sql      |  7 +++++++
5 files changed, 52 insertions(+)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2024-04-15 13:08 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 21:37 pg-migrator - pg_migrator: More _dosmaperr fixes. User Bmomjian <bmomjian@pgfoundry.org>
2024-04-15 13:08 pgsql: ATTACH PARTITION: Don't match a PK with a UNIQUE constraint Alvaro Herrera <alvherre@alvh.no-ip.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