1. 21 Jul, 2003 1 commit
  2. 01 Jul, 2003 1 commit
  3. 12 Jun, 2003 1 commit
  4. 08 May, 2003 1 commit
    • Tom Lane's avatar
      Update 3.0 protocol support to match recent agreements about how to · c0a8c3ac
      Tom Lane authored
      handle multiple 'formats' for data I/O.  Restructure CommandDest and
      DestReceiver stuff one more time (it's finally starting to look a bit
      clean though).  Code now matches latest 3.0 protocol document as far
      as message formats go --- but there is no support for binary I/O yet.
      c0a8c3ac
  5. 06 May, 2003 2 commits
    • Tom Lane's avatar
      Restructure command destination handling so that we pass around · 79913910
      Tom Lane authored
      DestReceiver pointers instead of just CommandDest values.  The DestReceiver
      is made at the point where the destination is selected, rather than
      deep inside the executor.  This cleans up the original kluge implementation
      of tstoreReceiver.c, and makes it easy to support retrieving results
      from utility statements inside portals.  Thus, you can now do fun things
      like Bind and Execute a FETCH or EXPLAIN command, and it'll all work
      as expected (e.g., you can Describe the portal, or use Execute's count
      parameter to suspend the output partway through).  Implementation involves
      stuffing the utility command's output into a Tuplestore, which would be
      kind of annoying for huge output sets, but should be quite acceptable
      for typical uses of utility commands.
      79913910
    • Tom Lane's avatar
      Implement feature of new FE/BE protocol whereby RowDescription identifies · 2cf57c8f
      Tom Lane authored
      the column by table OID and column number, if it's a simple column
      reference.  Along the way, get rid of reskey/reskeyop fields in Resdoms.
      Turns out that representation was not convenient for either the planner
      or the executor; we can make the planner deliver exactly what the
      executor wants with no more effort.
      initdb forced due to change in stored rule representation.
      2cf57c8f
  6. 15 Dec, 2002 1 commit
  7. 05 Dec, 2002 1 commit
    • Tom Lane's avatar
      Phase 1 of read-only-plans project: cause executor state nodes to point · 1fd0c59e
      Tom Lane authored
      to plan nodes, not vice-versa.  All executor state nodes now inherit from
      struct PlanState.  Copying of plan trees has been simplified by not
      storing a list of SubPlans in Plan nodes (eliminating duplicate links).
      The executor still needs such a list, but it can build it during
      ExecutorStart since it has to scan the plan tree anyway.
      No initdb forced since no stored-on-disk structures changed, but you
      will need a full recompile because of node-numbering changes.
      1fd0c59e
  8. 13 Nov, 2002 1 commit
  9. 11 Nov, 2002 1 commit
  10. 10 Nov, 2002 1 commit
  11. 04 Sep, 2002 1 commit
  12. 29 Aug, 2002 1 commit
  13. 23 Aug, 2002 1 commit
  14. 05 Aug, 2002 1 commit
    • Tom Lane's avatar
      Preliminary code review for anonymous-composite-types patch: fix breakage · 07f9682d
      Tom Lane authored
      of functions returning domain types, update documentation for typtype,
      move get_typtype to lsyscache.c (actually, resurrect the old version),
      add defense against creating pseudo-typed table columns, fix some
      bogus list-parsing in grammar.  Issues remain with respect to alias
      handling and type checking; Joe is on those.
      07f9682d
  15. 04 Aug, 2002 1 commit
    • Bruce Momjian's avatar
      Attached are two patches to implement and document anonymous composite · 9218689b
      Bruce Momjian authored
      types for Table Functions, as previously proposed on HACKERS. Here is a
      brief explanation:
      
      1. Creates a new pg_type typtype: 'p' for pseudo type (currently either
           'b' for base or 'c' for catalog, i.e. a class).
      
      2. Creates new builtin type of typtype='p' named RECORD. This is the
           first of potentially several pseudo types.
      
      3. Modify FROM clause grammer to accept:
           SELECT * FROM my_func() AS m(colname1 type1, colname2 type1, ...)
           where m is the table alias, colname1, etc are the column names, and
           type1, etc are the column types.
      
      4. When typtype == 'p' and the function return type is RECORD, a list
           of column defs is required, and when typtype != 'p', it is
      disallowed.
      
      5. A check was added to ensure that the tupdesc provide via the parser
           and the actual return tupdesc match in number and type of
      attributes.
      
      When creating a function you can do:
           CREATE FUNCTION foo(text) RETURNS setof RECORD ...
      
      When using it you can do:
           SELECT * from foo(sqlstmt) AS (f1 int, f2 text, f3 timestamp)
             or
           SELECT * from foo(sqlstmt) AS f(f1 int, f2 text, f3 timestamp)
             or
           SELECT * from foo(sqlstmt) f(f1 int, f2 text, f3 timestamp)
      
      Included in the patches are adjustments to the regression test sql and
      expected files, and documentation.
      
      p.s.
           This potentially solves (or at least improves) the issue of builtin
           Table Functions. They can be bootstrapped as returning RECORD, and
           we can wrap system views around them with properly specified column
           defs. For example:
      
           CREATE VIEW pg_settings AS
             SELECT s.name, s.setting
             FROM show_all_settings()AS s(name text, setting text);
      
           Then we can also add the UPDATE RULE that I previously posted to
           pg_settings, and have pg_settings act like a virtual table, allowing
           settings to be queried and set.
      
      
      Joe Conway
      9218689b
  16. 20 Jun, 2002 1 commit
  17. 21 May, 2002 1 commit
    • Tom Lane's avatar
      Remove global variable scanCommandId in favor of storing a command ID · 959e61e9
      Tom Lane authored
      in snapshots, per my proposal of a few days ago.  Also, tweak heapam.c
      routines (heap_insert, heap_update, heap_delete, heap_mark4update) to
      be passed the command ID to use, instead of doing GetCurrentCommandID.
      For catalog updates they'll still get passed current command ID, but
      for updates generated from the main executor they'll get passed the
      command ID saved in the snapshot the query is using.  This should fix
      some corner cases associated with functions and triggers that advance
      current command ID while an outer query is still in progress.
      959e61e9
  18. 12 May, 2002 1 commit
  19. 27 Feb, 2002 1 commit
    • Tom Lane's avatar
      Clean up BeginCommand and related routines. BeginCommand and EndCommand · 6779c55c
      Tom Lane authored
      are now both invoked once per received SQL command (raw parsetree) from
      pg_exec_query_string.  BeginCommand is actually just an empty routine
      at the moment --- all its former operations have been pushed into tuple
      receiver setup routines in printtup.c.  This makes for a clean distinction
      between BeginCommand/EndCommand (once per command) and the tuple receiver
      setup/teardown routines (once per ExecutorRun call), whereas the old code
      was quite ad hoc.  Along the way, clean up the calling conventions for
      ExecutorRun a little bit.
      6779c55c
  20. 26 Feb, 2002 1 commit
    • Tom Lane's avatar
      Restructure command-completion-report code so that there is just one · 56ee2ecb
      Tom Lane authored
      report for each received SQL command, regardless of rewriting activity.
      Also ensure that this report comes from the 'original' command, not the
      last command generated by rewrite; this fixes 7.2 breakage for INSERT
      commands that have actions added by rules.  Fernando Nasser and Tom Lane.
      56ee2ecb
  21. 28 Oct, 2001 1 commit
  22. 25 Oct, 2001 1 commit
  23. 22 Mar, 2001 2 commits
  24. 29 Jan, 2001 1 commit
    • Tom Lane's avatar
      Clean up handling of tuple descriptors so that result-tuple descriptors · 0d54d6ac
      Tom Lane authored
      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
  25. 24 Jan, 2001 1 commit
  26. 16 Nov, 2000 1 commit
  27. 12 Nov, 2000 1 commit
    • Tom Lane's avatar
      Restructure handling of inheritance queries so that they work with outer · 6543d81d
      Tom Lane authored
      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
  28. 26 Oct, 2000 1 commit
  29. 24 Aug, 2000 1 commit
  30. 08 Aug, 2000 1 commit
    • Tom Lane's avatar
      Remove 'func_tlist' from Func expression nodes, likewise 'param_tlist' · 62e29fe2
      Tom Lane authored
      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
  31. 12 Jul, 2000 1 commit
  32. 28 Jun, 2000 1 commit
    • Tom Lane's avatar
      First phase of memory management rewrite (see backend/utils/mmgr/README · 1aebc361
      Tom Lane authored
      for details).  It doesn't really do that much yet, since there are no
      short-term memory contexts in the executor, but the infrastructure is
      in place and long-term contexts are handled reasonably.  A few long-
      standing bugs have been fixed, such as 'VACUUM; anything' in a single
      query string crashing.  Also, out-of-memory is now considered a
      recoverable ERROR, not FATAL.
      Eliminate a large amount of crufty, now-dead code in and around
      memory management.
      Fix problem with holding off SIGTRAP, SIGSEGV, etc in postmaster and
      backend startup.
      1aebc361
  33. 28 May, 2000 1 commit
    • Tom Lane's avatar
      First round of changes for new fmgr interface. fmgr itself and the · 0a7fb4e9
      Tom Lane authored
      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
  34. 12 Apr, 2000 1 commit
  35. 04 Apr, 2000 1 commit
    • Tom Lane's avatar
      Fix bug noted by Bruce: FETCH in an already-aborted transaction block · 708f82f1
      Tom Lane authored
      would crash, due to premature invocation of SetQuerySnapshot().  Clean
      up problems with handling of multiple queries by splitting
      pg_parse_and_plan into two routines.  The old code would not, for
      example, do the right thing with END; SELECT... submitted in one query
      string when it had been in transaction abort state, because it'd decide
      to skip planning the SELECT before it had executed the END.  New
      arrangement is simpler and doesn't force caller to plan if only
      parse+rewrite is needed.
      708f82f1
  36. 26 Jan, 2000 1 commit
    • Bruce Momjian's avatar
      Add: · 5c25d602
      Bruce Momjian authored
        * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
      
      to all files copyright Regents of Berkeley.  Man, that's a lot of files.
      5c25d602
  37. 17 Jul, 1999 1 commit
  38. 16 Jul, 1999 1 commit