Skip to content
Snippets Groups Projects
Select Git revision
  • benchmark-tools
  • postgres-lambda
  • master default
  • REL9_4_25
  • REL9_5_20
  • REL9_6_16
  • REL_10_11
  • REL_11_6
  • REL_12_1
  • REL_12_0
  • REL_12_RC1
  • REL_12_BETA4
  • REL9_4_24
  • REL9_5_19
  • REL9_6_15
  • REL_10_10
  • REL_11_5
  • REL_12_BETA3
  • REL9_4_23
  • REL9_5_18
  • REL9_6_14
  • REL_10_9
  • REL_11_4
23 results

postgres_fdw.c

Blame
    • Tom Lane's avatar
      7b8b8a43
      Improve representation of PlanRowMark. · 7b8b8a43
      Tom Lane authored
      This patch fixes two inadequacies of the PlanRowMark representation.
      
      First, that the original LockingClauseStrength isn't stored (and cannot be
      inferred for foreign tables, which always get ROW_MARK_COPY).  Since some
      PlanRowMarks are created out of whole cloth and don't actually have an
      ancestral RowMarkClause, this requires adding a dummy LCS_NONE value to
      enum LockingClauseStrength, which is fairly annoying but the alternatives
      seem worse.  This fix allows getting rid of the use of get_parse_rowmark()
      in FDWs (as per the discussion around commits 462bd957 and
      8ec8760f), and it simplifies some things elsewhere.
      
      Second, that the representation assumed that all child tables in an
      inheritance hierarchy would use the same RowMarkType.  That's true today
      but will soon not be true.  We add an "allMarkTypes" field that identifies
      the union of mark types used in all a parent table's children, and use
      that where appropriate (currently, only in preprocess_targetlist()).
      
      In passing fix a couple of minor infelicities left over from the SKIP
      LOCKED patch, notably that _outPlanRowMark still thought waitPolicy
      is a bool.
      
      Catversion bump is required because the numeric values of enum
      LockingClauseStrength can appear in on-disk rules.
      
      Extracted from a much larger patch to support foreign table inheritance;
      it seemed worth breaking this out, since it's a separable concern.
      
      Shigeru Hanada and Etsuro Fujita, somewhat modified by me
      7b8b8a43
      History
      Improve representation of PlanRowMark.
      Tom Lane authored
      This patch fixes two inadequacies of the PlanRowMark representation.
      
      First, that the original LockingClauseStrength isn't stored (and cannot be
      inferred for foreign tables, which always get ROW_MARK_COPY).  Since some
      PlanRowMarks are created out of whole cloth and don't actually have an
      ancestral RowMarkClause, this requires adding a dummy LCS_NONE value to
      enum LockingClauseStrength, which is fairly annoying but the alternatives
      seem worse.  This fix allows getting rid of the use of get_parse_rowmark()
      in FDWs (as per the discussion around commits 462bd957 and
      8ec8760f), and it simplifies some things elsewhere.
      
      Second, that the representation assumed that all child tables in an
      inheritance hierarchy would use the same RowMarkType.  That's true today
      but will soon not be true.  We add an "allMarkTypes" field that identifies
      the union of mark types used in all a parent table's children, and use
      that where appropriate (currently, only in preprocess_targetlist()).
      
      In passing fix a couple of minor infelicities left over from the SKIP
      LOCKED patch, notably that _outPlanRowMark still thought waitPolicy
      is a bool.
      
      Catversion bump is required because the numeric values of enum
      LockingClauseStrength can appear in on-disk rules.
      
      Extracted from a much larger patch to support foreign table inheritance;
      it seemed worth breaking this out, since it's a separable concern.
      
      Shigeru Hanada and Etsuro Fujita, somewhat modified by me