1. 07 May, 2021 6 commits
  2. 06 May, 2021 12 commits
  3. 05 May, 2021 4 commits
    • Alvaro Herrera's avatar
      Remove unused argument of ATAddForeignConstraint · c250062d
      Alvaro Herrera authored
      Commit 0325d7a5 made this unused but forgot to remove it. Do so now.
      
      Author: Amit Langote <amitlangote09@gmail.com>
      Discussion: https://postgr.es/m/209c99fe-b9a2-94f4-cd68-a8304186a09e@lab.ntt.co.jp
      c250062d
    • Alvaro Herrera's avatar
      Have ALTER CONSTRAINT recurse on partitioned tables · 6f70d7ca
      Alvaro Herrera authored
      When ALTER TABLE .. ALTER CONSTRAINT changes deferrability properties
      changed in a partitioned table, we failed to propagate those changes
      correctly to partitions and to triggers.  Repair by adding a recursion
      mechanism to affect all derived constraints and all derived triggers.
      (In particular, recurse to partitions even if their respective parents
      are already in the desired state: it is possible for the partitions to
      have been altered individually.)  Because foreign keys involve tables in
      two sides, we cannot use the standard ALTER TABLE recursion mechanism,
      so we invent our own by following pg_constraint.conparentid down.
      
      When ALTER TABLE .. ALTER CONSTRAINT is invoked on the derived
      pg_constraint object that's automaticaly created in a partition as a
      result of a constraint added to its parent, raise an error instead of
      pretending to work and then failing to modify all the affected triggers.
      Before this commit such a command would be allowed but failed to affect
      all triggers, so it would silently misbehave.  (Restoring dumps of
      existing databases is not affected, because pg_dump does not produce
      anything for such a derived constraint anyway.)
      
      Add some tests for the case.
      
      Backpatch to 11, where foreign key support was added to partitioned
      tables by commit 3de241db.  (A related change is commit f56f8f8d
      in pg12 which added support for FKs *referencing* partitioned tables;
      this is what forces us to use an ad-hoc recursion mechanism for this.)
      
      Diagnosed by Tom Lane from bug report from Ron L Johnson.  As of this
      writing, no reviews were offered.
      
      Discussion: https://postgr.es/m/75fe0761-a291-86a9-c8d8-4906da077469@gmail.com
      Discussion: https://postgr.es/m/3144850.1607369633@sss.pgh.pa.us
      6f70d7ca
    • Tom Lane's avatar
      Doc: improve and centralize the documentation for OID alias types. · f33a178a
      Tom Lane authored
      Previously, a lot of information about type regclass existed only
      in the discussion of the sequence functions.  Maybe that made sense
      in the beginning, because I think originally those were the only
      functions taking regclass.  But it doesn't make sense anymore.
      Move that material to the "Object Identifier Types" section in
      datatype.sgml, generalize it to talk about the other reg* types
      as well, and add more examples.
      
      Per bug #16991 from Federico Caselli.
      
      Discussion: https://postgr.es/m/16991-bcaeaafa17e0a723@postgresql.org
      f33a178a
    • Peter Eisentraut's avatar
      38f36aad
  4. 04 May, 2021 6 commits
  5. 03 May, 2021 10 commits
  6. 01 May, 2021 1 commit
  7. 30 Apr, 2021 1 commit