1. 21 9月, 2001 1 次提交
    • T
      Quick-and-dirty fix for recursive plpgsql functions, per bug report from · ae3129fd
      Tom Lane 提交于
      Frank Miles 7-Sep-01.  This is really just sticking a finger in the dike.
      Frank's case works now, but we still couldn't support a recursive function
      returning a set.  Really need to restructure querytrees and execution
      state so that the querytree is *read only*.  We've run into this over and
      over and over again ... it has to happen sometime soon.
      ae3129fd
  2. 20 6月, 2001 1 次提交
  3. 19 4月, 2001 1 次提交
    • T
      Kluge solution for Alex Pilosov's report of problems with whole-tuple · 2dbdba86
      Tom Lane 提交于
      function arguments in join queries: copy the tuples into
      TransactionCommandContext so they don't get recycled too soon.  This is
      horrid, but not any worse than 7.0 or before, which also leaked such
      tuples until end of query.  A proper fix will require allowing tuple
      datums to be physically stored inside larger tuple datums, which opens
      up a bunch of issues that can't realistically be solved for 7.1.1.
      2dbdba86
  4. 23 3月, 2001 1 次提交
  5. 22 3月, 2001 1 次提交
  6. 29 1月, 2001 1 次提交
    • T
      Clean up handling of tuple descriptors so that result-tuple descriptors · 0d54d6ac
      Tom Lane 提交于
      allocated by plan nodes are not leaked at end of query.  This doesn't
      really matter for normal queries, but it sure does for queries invoked
      repetitively inside SQL functions.  Clean up some other grotty code
      associated with tupdescs, and fix a few other memory leaks exposed by
      tests with simple SQL functions.
      0d54d6ac
  7. 25 1月, 2001 1 次提交
  8. 12 11月, 2000 1 次提交
    • T
      Restructure handling of inheritance queries so that they work with outer · 6543d81d
      Tom Lane 提交于
      joins, and clean things up a good deal at the same time.  Append plan node
      no longer hacks on rangetable at runtime --- instead, all child tables are
      given their own RT entries during planning.  Concept of multiple target
      tables pushed up into execMain, replacing bug-prone implementation within
      nodeAppend.  Planner now supports generating Append plans for inheritance
      sets either at the top of the plan (the old way) or at the bottom.  Expanding
      at the bottom is appropriate for tables used as sources, since they may
      appear inside an outer join; but we must still expand at the top when the
      target of an UPDATE or DELETE is an inheritance set, because we actually need
      a different targetlist and junkfilter for each target table in that case.
      Fortunately a target table can't be inside an outer join...  Bizarre mutual
      recursion between union_planner and prepunion.c is gone --- in fact,
      union_planner doesn't really have much to do with union queries anymore,
      so I renamed it grouping_planner.
      6543d81d
  9. 25 8月, 2000 1 次提交
  10. 24 8月, 2000 1 次提交
  11. 22 8月, 2000 1 次提交
  12. 08 8月, 2000 1 次提交
    • T
      Remove 'func_tlist' from Func expression nodes, likewise 'param_tlist' · 62e29fe2
      Tom Lane 提交于
      from Param nodes, per discussion a few days ago on pghackers.  Add new
      expression node type FieldSelect that implements the functionality where
      it's actually needed.  Clean up some other unused fields in Func nodes
      as well.
      NOTE: initdb forced due to change in stored expression trees for rules.
      62e29fe2
  13. 23 7月, 2000 1 次提交
    • T
      Further cleanup of array behavior. Slice assignments to arrays with · e4e6459c
      Tom Lane 提交于
      varlena elements work now.  Allow assignment to previously-nonexistent
      subscript position to extend array, but only for 1-D arrays and only
      if adjacent to existing positions (could do more if we had a way to
      represent nulls in arrays, but I don't want to tackle that now).
      Arrange for assignment of NULL to an array element in UPDATE to be a
      no-op, rather than setting the entire array to NULL as it used to.
      (Throwing an error would be a reasonable alternative, but it's never
      done that...)  Update regress test accordingly.
      e4e6459c
  14. 22 7月, 2000 1 次提交
    • T
      Arrays are toastable. (At least if you initdb, which I didn't force.) · d0e17e21
      Tom Lane 提交于
      Remove a bunch of crufty code for large-object-based arrays, which is
      superseded by TOAST and likely hasn't worked in a long time anyway.
      Clean up array code a little, and in particular eliminate its habit
      of scribbling on the input array (ie, modifying the input tuple :-().
      d0e17e21
  15. 17 7月, 2000 1 次提交
    • T
      Revise aggregate functions per earlier discussions in pghackers. · bec98a31
      Tom Lane 提交于
      There's now only one transition value and transition function.
      NULL handling in aggregates is a lot cleaner.  Also, use Numeric
      accumulators instead of integer accumulators for sum/avg on integer
      datatypes --- this avoids overflow at the cost of being a little slower.
      Implement VARIANCE() and STDDEV() aggregates in the standard backend.
      
      Also, enable new LIKE selectivity estimators by default.  Unrelated
      change, but as long as I had to force initdb anyway...
      bec98a31
  16. 12 7月, 2000 1 次提交
  17. 15 6月, 2000 1 次提交
  18. 13 6月, 2000 1 次提交
  19. 29 5月, 2000 1 次提交
    • T
      First round of changes for new fmgr interface. fmgr itself and the · 0a7fb4e9
      Tom Lane 提交于
      key call sites are changed, but most called functions are still oldstyle.
      An exception is that the PL managers are updated (so, for example, NULL
      handling now behaves as expected in plperl and plpgsql functions).
      NOTE initdb is forced due to added column in pg_proc.
      0a7fb4e9
  20. 13 4月, 2000 1 次提交
  21. 21 2月, 2000 1 次提交
    • T
      Create a new expression node type RelabelType, which exists solely to · 57b30e8e
      Tom Lane 提交于
      represent the result of a binary-compatible type coercion.  At runtime
      it just evaluates its argument --- but during type resolution, exprType
      will pick up the output type of the RelabelType node instead of the type
      of the argument.  This solves some longstanding problems with dropped
      type coercions, an example being 'select now()::abstime::int4' which
      used to produce date-formatted output, not an integer, because the
      coercion to int4 was dropped on the floor.
      57b30e8e
  22. 26 1月, 2000 1 次提交
    • B
      Add: · 5c25d602
      Bruce Momjian 提交于
        * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
      
      to all files copyright Regents of Berkeley.  Man, that's a lot of files.
      5c25d602
  23. 20 1月, 2000 1 次提交
    • T
      Fix handling of NULL constraint conditions: per SQL92 spec, a NULL result · 6d1efd76
      Tom Lane 提交于
      from a constraint condition does not violate the constraint (cf. discussion
      on pghackers 12/9/99).  Implemented by adding a parameter to ExecQual,
      specifying whether to return TRUE or FALSE when the qual result is
      really NULL in three-valued boolean logic.  Currently, ExecRelCheck is
      the only caller that asks for TRUE, but if we find any other places that
      have the wrong response to NULL, it'll be easy to fix them.
      6d1efd76
  24. 11 1月, 2000 1 次提交
  25. 12 11月, 1999 1 次提交
  26. 08 10月, 1999 1 次提交
  27. 27 9月, 1999 1 次提交
    • T
      Modify nodeAgg.c so that no rows are returned for a GROUP BY · be09bc9f
      Tom Lane 提交于
      with no input rows, per pghackers discussions around 7/22/99.  Clean up
      a bunch of ugly coding while at it; remove redundant re-lookup of
      aggregate info at start of each new GROUP.  Arrange to pfree intermediate
      values when they are pass-by-ref types, so that aggregates on pass-by-ref
      types no longer eat memory.  This takes care of a couple of TODO items...
      be09bc9f
  28. 26 9月, 1999 1 次提交
    • T
      Implement constant-expression simplification per Bernard · 40f65241
      Tom Lane 提交于
      Frankpitt, plus some improvements from yours truly.  The simplifier depends
      on the proiscachable field of pg_proc to tell it whether a function is
      safe to pre-evaluate --- things like nextval() are not, for example.
      Update pg_proc.h to contain reasonable cacheability information; as of
      6.5.* hardly any functions were marked cacheable.  I may have erred too
      far in the other direction; see recent mail to pghackers for more info.
      This update does not force an initdb, exactly, but you won't see much
      benefit from the simplifier until you do one.
      40f65241
  29. 24 9月, 1999 1 次提交
    • T
      Several changes here, not very related but touching some of the same files. · e812458b
      Tom Lane 提交于
      * Buffer refcount cleanup (per my "progress report" to pghackers, 9/22).
      * Add links to backend PROC structs to sinval's array of per-backend info,
      and use these links for routines that need to check the state of all
      backends (rather than the slow, complicated search of the ShmemIndex
      hashtable that was used before).  Add databaseOID to PROC structs.
      * Use this to implement an interlock that prevents DESTROY DATABASE of
      a database containing running backends.  (It's a little tricky to prevent
      a concurrently-starting backend from getting in there, since the new
      backend is not able to lock anything at the time it tries to look up
      its database in pg_database.  My solution is to recheck that the DB is
      OK at the end of InitPostgres.  It may not be a 100% solution, but it's
      a lot better than no interlock at all...)
      * In ALTER TABLE RENAME, flush buffers for the relation before doing the
      rename of the physical files, to ensure we don't get failures later from
      mdblindwrt().
      * Update TRUNCATE patch so that it actually compiles against current
      sources :-(.
      You should do "make clean all" after pulling these changes.
      e812458b
  30. 19 9月, 1999 1 次提交
  31. 19 7月, 1999 1 次提交
    • T
      Rewrite parser's handling of INSERT ... SELECT so that processing · 7f76eab1
      Tom Lane 提交于
      of the SELECT part of the statement is just like a plain SELECT.  All
      INSERT-specific processing happens after the SELECT parsing is done.
      This eliminates many problems, e.g. INSERT ... SELECT ... GROUP BY using
      the wrong column labels.  Ensure that DEFAULT clauses are coerced to
      the target column type, whether or not stored clause produces the right
      type.  Substantial cleanup of parser's array support.
      7f76eab1
  32. 18 7月, 1999 1 次提交
  33. 16 7月, 1999 2 次提交
  34. 15 7月, 1999 1 次提交
  35. 13 6月, 1999 1 次提交
    • T
      When targetlist is NULL, ExecTargetList was passing back a · 1918a1d1
      Tom Lane 提交于
      pointer to palloc'd but uninitialized memory.  This is not cool; anyone looking
      at the returned 'tuple' would at best coredump and at worst behave in a
      bizarre and irreproducible way.  Fix it to return a predictable value,
      namely a correctly-set-up palloc'd tuple containing zero attributes.
      I believe this fix is both safe and critical.
      1918a1d1
  36. 26 5月, 1999 2 次提交
  37. 20 3月, 1999 2 次提交