1. 11 11月, 2002 1 次提交
  2. 10 11月, 2002 2 次提交
  3. 07 11月, 2002 1 次提交
  4. 06 11月, 2002 1 次提交
    • T
      First phase of implementing hash-based grouping/aggregation. An AGG plan · f6dba10e
      Tom Lane 提交于
      node now does its own grouping of the input rows, and has no need for a
      preceding GROUP node in the plan pipeline.  This allows elimination of
      the misnamed tuplePerGroup option for GROUP, and actually saves more code
      in nodeGroup.c than it costs in nodeAgg.c, as well as being presumably
      faster.  Restructure the API of query_planner so that we do not commit to
      using a sorted or unsorted plan in query_planner; instead grouping_planner
      makes the decision.  (Right now it isn't any smarter than query_planner
      was, but that will change as soon as it has the option to select a hash-
      based aggregation step.)  Despite all the hackery, no initdb needed since
      only in-memory node types changed.
      f6dba10e
  5. 02 11月, 2002 2 次提交
  6. 15 10月, 2002 2 次提交
    • T
      Make SPI's execution of querystrings follow the rules agreed to for · 9ff695c9
      Tom Lane 提交于
      command status at the interactive level.  SPI_processed, etc are set
      in the same way as the returned command status would have been set if
      the same querystring were issued interactively.  Per gripe from
      Michael Paesold 25-Sep-02.
      9ff695c9
    • T
      Arrange to copy relcache's trigdesc structure at the start of any · 8f2a289d
      Tom Lane 提交于
      query that uses it.  This ensures that triggers will be applied consistently
      throughout a query even if someone commits changes to the relation's
      pg_class.reltriggers field meanwhile.  Per crash report from Laurette Cisneros.
      While at it, simplify memory management in relcache.c, which no longer
      needs the old hack to try to keep trigger info in the same place over
      a relcache entry rebuild.  (Should try to fix rd_att and rewrite-rule
      access similarly, someday.)  And make RelationBuildTriggers simpler and
      more robust by making it build the trigdesc in working memory and then
      CopyTriggerDesc() into cache memory.
      8f2a289d
  7. 05 10月, 2002 1 次提交
    • T
      Tweak a few of the most heavily used function call points to zero out · 3b8ba163
      Tom Lane 提交于
      just the significant fields of FunctionCallInfoData, rather than MemSet'ing
      the whole struct to zero.  Unused positions in the arg[] array will
      thereby contain garbage rather than zeroes.  This buys back some of the
      performance hit from increasing FUNC_MAX_ARGS.  Also tweak tuplesort.c
      code for more speed by marking some routines 'inline'.  All together
      these changes speed up simple sorts, like count(distinct int4column),
      by about 25% on a P4 running RH Linux 7.2.
      3b8ba163
  8. 29 9月, 2002 1 次提交
  9. 24 9月, 2002 1 次提交
    • T
      Further thinking about heap_mark4update: in HeapTupleSelfUpdated case, · 233ecca7
      Tom Lane 提交于
      executor should not return the tuple as successfully marked, because in
      fact it's been deleted.  Not clear that this case has ever been seen
      in practice (I think you'd have to write a SELECT FOR UPDATE that calls
      a function that deletes some row the SELECT will visit later...) but we
      should be consistent.  Also add comments to several other places that
      got it right but didn't explain what they were doing.
      233ecca7
  10. 19 9月, 2002 1 次提交
    • T
      Extend pg_cast castimplicit column to a three-way value; this allows us · b26dfb95
      Tom Lane 提交于
      to be flexible about assignment casts without introducing ambiguity in
      operator/function resolution.  Introduce a well-defined promotion hierarchy
      for numeric datatypes (int2->int4->int8->numeric->float4->float8).
      Change make_const to initially label numeric literals as int4, int8, or
      numeric (never float8 anymore).
      Explicitly mark Func and RelabelType nodes to indicate whether they came
      from a function call, explicit cast, or implicit cast; use this to do
      reverse-listing more accurately and without so many heuristics.
      Explicit casts to char, varchar, bit, varbit will truncate or pad without
      raising an error (the pre-7.2 behavior), while assigning to a column without
      any explicit cast will still raise an error for wrong-length data like 7.3.
      This more nearly follows the SQL spec than 7.2 behavior (we should be
      reporting a 'completion condition' in the explicit-cast cases, but we have
      no mechanism for that, so just do silent truncation).
      Fix some problems with enforcement of typmod for array elements;
      it didn't work at all in 'UPDATE ... SET array[n] = foo', for example.
      Provide a generalized array_length_coerce() function to replace the
      specialized per-array-type functions that used to be needed (and were
      missing for NUMERIC as well as all the datetime types).
      Add missing conversions int8<->float4, text<->numeric, oid<->int8.
      initdb forced.
      b26dfb95
  11. 05 9月, 2002 1 次提交
  12. 02 9月, 2002 2 次提交
  13. 01 9月, 2002 3 次提交
  14. 31 8月, 2002 1 次提交
  15. 30 8月, 2002 2 次提交
  16. 29 8月, 2002 2 次提交
  17. 27 8月, 2002 1 次提交
    • T
      Modify array operations to include array's element type OID in the · 5cabcfcc
      Tom Lane 提交于
      array header, and to compute sizing and alignment of array elements
      the same way normal tuple access operations do --- viz, using the
      tupmacs.h macros att_addlength and att_align.  This makes the world
      safe for arrays of cstrings or intervals, and should make it much
      easier to write array-type-polymorphic functions; as examples see
      the cleanups of array_out and contrib/array_iterator.  By Joe Conway
      and Tom Lane.
      5cabcfcc
  18. 24 8月, 2002 2 次提交
  19. 16 8月, 2002 1 次提交
    • B
      Tom Lane wrote: · b1a5f872
      Bruce Momjian 提交于
      > There's no longer a separate call to heap_storage_create in that routine
      > --- the right place to make the test is now in the storage_create
      > boolean parameter being passed to heap_create.  A simple change, but
      > it passeth patch's understanding ...
      
      Thanks.
      
      Attached is a patch against cvs tip as of 8:30 PM PST or so. Turned out
      that even after fixing the failed hunks, there was a new spot in
      bufmgr.c which needed to be fixed (related to temp relations;
      RelationUpdateNumberOfBlocks). But thankfully the regression test code
      caught it :-)
      
      Joe Conway
      b1a5f872
  20. 08 8月, 2002 1 次提交
  21. 06 8月, 2002 1 次提交
    • T
      Restructure local-buffer handling per recent pghackers discussion. · 5df307c7
      Tom Lane 提交于
      The local buffer manager is no longer used for newly-created relations
      (unless they are TEMP); a new non-TEMP relation goes through the shared
      bufmgr and thus will participate normally in checkpoints.  But TEMP relations
      use the local buffer manager throughout their lifespan.  Also, operations
      in TEMP relations are not logged in WAL, thus improving performance.
      Since it's no longer necessary to fsync relations as they move out of the
      local buffers into shared buffers, quite a lot of smgr.c/md.c/fd.c code
      is no longer needed and has been removed: there's no concept of a dirty
      relation anymore in md.c/fd.c, and we never fsync anything but WAL.
      Still TODO: improve local buffer management algorithms so that it would
      be reasonable to increase NLocBuffer.
      5df307c7
  22. 05 8月, 2002 2 次提交
    • T
      Preliminary code review for anonymous-composite-types patch: fix breakage · 07f9682d
      Tom Lane 提交于
      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
    • B
      Attached are two patches to implement and document anonymous composite · 9218689b
      Bruce Momjian 提交于
      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
  23. 04 8月, 2002 1 次提交
    • B
      Change messages like this: · 7312c19a
      Bruce Momjian 提交于
      ERROR:  ExecInsert: rejected due to CHECK constraint insert_con
      
      To be like this:
      
      ERROR:  ExecInsert: rejected due to CHECK constraint "insert_con" on
      "insert_tbl"
      
      Updated regression tests to match.
      
      I got sick of seeing 'rejected due to CHECK constraint "$1" in my log and
      not being able to find the bug in our website code...
      
      Christopher Kings-Lynne
      7312c19a
  24. 25 7月, 2002 1 次提交
  25. 20 7月, 2002 2 次提交
    • B
      > 2. This patch includes the same Table Function API fixes that I · 1ce03603
      Bruce Momjian 提交于
      >    submitted on July 9:
      >
      >    http://archives.postgresql.org/pgsql-patches/2002-07/msg00056.php
      >
      >    Please disregard that one *if* this one is applied. If this one is
      >    rejected please go ahead with the July 9th patch.
      
      The July 9th Table Function API patch mentioned above is now in CVS, so
      here is an updated version of the guc patch which should apply cleanly
      against CVS tip.
      
      Joe Conway
      1ce03603
    • B
      oid is needed, it is added at the end of the struct (after the null · b0f5086e
      Bruce Momjian 提交于
      bitmap, if present).
      
      Per Tom Lane's suggestion the information whether a tuple has an oid
      or not is carried in the tuple descriptor.  For debugging reasons
      tdhasoid is of type char, not bool.  There are predefined values for
      WITHOID, WITHOUTOID and UNDEFOID.
      
      This patch has been generated against a cvs snapshot from last week
      and I don't expect it to apply cleanly to current sources.  While I
      post it here for public review, I'm working on a new version against a
      current snapshot.  (There's been heavy activity recently; hope to
      catch up some day ...)
      
      This is a long patch;  if it is too hard to swallow, I can provide it
      in smaller pieces:
      
      Part 1:  Accessor macros
      Part 2:  tdhasoid in TupDesc
      Part 3:  Regression test
      Part 4:  Parameter withoid to heap_addheader
      Part 5:  Eliminate t_oid from HeapTupleHeader
      
      Part 2 is the most hairy part because of changes in the executor and
      even in the parser;  the other parts are straightforward.
      
      Up to part 4 the patched postmaster stays binary compatible to
      databases created with an unpatched version.  Part 5 is small (100
      lines) and finally breaks compatibility.
      
      Manfred Koizar
      b0f5086e
  26. 19 7月, 2002 1 次提交
  27. 18 7月, 2002 2 次提交
  28. 12 7月, 2002 1 次提交