1. 14 Oct, 2008 10 commits
  2. 13 Oct, 2008 4 commits
  3. 11 Oct, 2008 1 commit
  4. 10 Oct, 2008 4 commits
  5. 09 Oct, 2008 8 commits
  6. 08 Oct, 2008 1 commit
  7. 07 Oct, 2008 8 commits
  8. 06 Oct, 2008 4 commits
    • Tom Lane's avatar
      Fix up ruleutils.c for CTE features. The main problem was that · 742fd06d
      Tom Lane authored
      get_name_for_var_field didn't have enough context to interpret a reference to
      a CTE query's output.  Fixing this requires separate hacks for the regular
      deparse case (pg_get_ruledef) and for the EXPLAIN case, since the available
      context information is quite different.  It's pretty nearly parallel to the
      existing code for SUBQUERY RTEs, though.  Also, add code to make sure we
      qualify a relation name that matches a CTE name; else the CTE will mistakenly
      capture the reference when reloading the rule.
      
      In passing, fix a pre-existing problem with get_name_for_var_field not working
      on variables in targetlists of SubqueryScan plan nodes.  Although latent all
      along, this wasn't a problem until we made EXPLAIN VERBOSE try to print
      targetlists.  To do this, refactor the deparse_context_for_plan API so that
      the special case for SubqueryScan is all on ruleutils.c's side.
      742fd06d
    • Tom Lane's avatar
      When expanding a whole-row Var into a RowExpr during ResolveNew(), attach · bf461538
      Tom Lane authored
      the column alias names of the RTE referenced by the Var to the RowExpr.
      This is needed to allow ruleutils.c to correctly deparse FieldSelect nodes
      referencing such a construct.  Per my recent bug report.
      
      Adding a field to RowExpr forces initdb (because of stored rules changes)
      so this solution is not back-patchable; which is unfortunate because 8.2
      and 8.3 have this issue.  But it only affects EXPLAIN for some pretty odd
      corner cases, so we can probably live without a solution for the back
      branches.
      bf461538
    • Tom Lane's avatar
      Fix GetCTEForRTE() to deal with the possibility that the RTE it's given came · e64bb65a
      Tom Lane authored
      from a query level above the current ParseState.
      e64bb65a
    • Heikki Linnakangas's avatar
      Use fork names instead of numbers in the file names for additional · 5f853c65
      Heikki Linnakangas authored
      relation forks. While the file names are not visible to users, for those
      that do peek into the data directory, it's nice to have more descriptive
      names. Per Greg Stark's suggestion.
      5f853c65