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

analyze.c

  • Tom Lane's avatar
    158b7fa6
    Disallow LATERAL references to the target table of an UPDATE/DELETE. · 158b7fa6
    Tom Lane authored
    On second thought, commit 0c051c90 was
    over-hasty: rather than allowing this case, we ought to reject it for now.
    That leaves the field clear for a future feature that allows the target
    table to be re-specified in the FROM (or USING) clause, which will enable
    left-joining the target table to something else.  We can then also allow
    LATERAL references to such an explicitly re-specified target table.
    But allowing them right now will create ambiguities or worse for such a
    feature, and it isn't something we documented 9.3 as supporting.
    
    While at it, add a convenience subroutine to avoid having several copies
    of the ereport for disalllowed-LATERAL-reference cases.
    158b7fa6
    History
    Disallow LATERAL references to the target table of an UPDATE/DELETE.
    Tom Lane authored
    On second thought, commit 0c051c90 was
    over-hasty: rather than allowing this case, we ought to reject it for now.
    That leaves the field clear for a future feature that allows the target
    table to be re-specified in the FROM (or USING) clause, which will enable
    left-joining the target table to something else.  We can then also allow
    LATERAL references to such an explicitly re-specified target table.
    But allowing them right now will create ambiguities or worse for such a
    feature, and it isn't something we documented 9.3 as supporting.
    
    While at it, add a convenience subroutine to avoid having several copies
    of the ereport for disalllowed-LATERAL-reference cases.