1. 11 7月, 2005 1 次提交
    • T
      Change typreceive function API so that receive functions get the same · d78397d3
      Tom Lane 提交于
      optional arguments as text input functions, ie, typioparam OID and
      atttypmod.  Make all the datatypes that use typmod enforce it the same
      way in typreceive as they do in typinput.  This fixes a problem with
      failure to enforce length restrictions during COPY FROM BINARY.
      d78397d3
  2. 10 7月, 2005 1 次提交
    • B
      I made the patch that implements regexp_replace again. · 75a64eeb
      Bruce Momjian 提交于
      The specification of this function is as follows.
      
      regexp_replace(source text, pattern text, replacement text, [flags
      text])
      returns text
      
      Replace string that matches to regular expression in source text to
      replacement text.
      
       - pattern is regular expression pattern.
       - replacement is replace string that can use '\1'-'\9', and '\&'.
          '\1'-'\9': back reference to the n'th subexpression.
          '\&'     : entire matched string.
       - flags can use the following values:
          g: global (replace all)
          i: ignore case
          When the flags is not specified, case sensitive, replace the first
          instance only.
      
      Atsushi Ogawa
      75a64eeb
  3. 07 7月, 2005 1 次提交
  4. 02 7月, 2005 1 次提交
    • T
      Migrate rtree_gist functionality into the core system, and add some · e7e16942
      Tom Lane 提交于
      basic regression tests for GiST to the standard regression tests.
      I took the opportunity to add an rtree-equivalent gist opclass for
      circles; the contrib version only covered boxes and polygons, but
      indexing circles is very handy for distance searches.
      e7e16942
  5. 28 6月, 2005 1 次提交
    • T
      Replace pg_shadow and pg_group by new role-capable catalogs pg_authid · 7762619e
      Tom Lane 提交于
      and pg_auth_members.  There are still many loose ends to finish in this
      patch (no documentation, no regression tests, no pg_dump support for
      instance).  But I'm going to commit it now anyway so that Alvaro can
      make some progress on shared dependencies.  The catalog changes should
      be pretty much done.
      7762619e
  6. 26 6月, 2005 1 次提交
  7. 25 6月, 2005 1 次提交
    • T
      Extend r-tree operator classes to handle Y-direction tests equivalent · b90f8f20
      Tom Lane 提交于
      to the existing X-direction tests.  An rtree class now includes 4 actual
      2-D tests, 4 1-D X-direction tests, and 4 1-D Y-direction tests.
      This involved adding four new Y-direction test operators for each of
      box and polygon; I followed the PostGIS project's lead as to the names
      of these operators.
      NON BACKWARDS COMPATIBLE CHANGE: the poly_overleft (&<) and poly_overright
      (&>) operators now have semantics comparable to box_overleft and box_overright.
      This is necessary to make r-tree indexes work correctly on polygons.
      Also, I changed circle_left and circle_right to agree with box_left and
      box_right --- formerly they allowed the boundaries to touch.  This isn't
      actually essential given the lack of any r-tree opclass for circles, but
      it seems best to sync all the definitions while we are at it.
      b90f8f20
  8. 20 6月, 2005 1 次提交
    • T
      1. full functional WAL for GiST · d544ec8b
      Teodor Sigaev 提交于
      2. improve vacuum for gist
         - use FSM
         - full vacuum:
            - reforms parent tuple if it's needed
              ( tuples was deleted on child page or parent tuple remains invalid
                after crash recovery )
            - truncate index file if possible
      3. fixes bugs and mistakes
      d544ec8b
  9. 18 6月, 2005 1 次提交
  10. 15 6月, 2005 1 次提交
  11. 13 6月, 2005 1 次提交
    • T
      Adjust lo_open() so that specifying INV_READ without INV_WRITE creates · a2fb7b8a
      Tom Lane 提交于
      a descriptor that uses the current transaction snapshot, rather than
      SnapshotNow as it did before (and still does if INV_WRITE is set).
      This means pg_dump will now dump a consistent snapshot of large object
      contents, as it never could do before.  Also, add a lo_create() function
      that is similar to lo_creat() but allows the desired OID of the large
      object to be specified.  This will simplify pg_restore considerably
      (but I'll fix that in a separate commit).
      a2fb7b8a
  12. 10 6月, 2005 1 次提交
    • B
      Please find attached a patch (diff -c against cvs HEAD) to add a · 4d0e7b4a
      Bruce Momjian 提交于
      function that accepts a double precision argument assumed to be a Unix
      epoch timestamp and returns timestamp with time zone, and accompanying
      documentation.
      
      Usage:
      
      test=# select to_timestamp(200120400);
             to_timestamp
      ------------------------
        1976-05-05 14:00:00+09
      (1 row)
      
      Michael Glaesemann
      4d0e7b4a
  13. 07 6月, 2005 1 次提交
  14. 20 5月, 2005 1 次提交
  15. 18 5月, 2005 1 次提交
  16. 09 5月, 2005 1 次提交
    • N
      Complete the following TODO items: · 4744c1a0
      Neil Conway 提交于
      * Add session start time to pg_stat_activity
      * Add the client IP address and port to pg_stat_activity
      
      Original patch from Magnus Hagander, code review by Neil Conway. Catalog
      version bumped. This patch sends the client IP address and port number in
      every statistics message; that's not ideal, but will be fixed up shortly.
      4744c1a0
  17. 01 5月, 2005 1 次提交
  18. 14 4月, 2005 1 次提交
    • T
      First phase of project to use fixed OIDs for all system catalogs and · 7c13781e
      Tom Lane 提交于
      indexes.  Extend the macros in include/catalog/*.h to carry the info
      about hand-assigned OIDs, and adjust the genbki script and bootstrap
      code to make the relations actually get those OIDs.  Remove the small
      number of RelOid_pg_foo macros that we had in favor of a complete
      set named like the catname.h and indexing.h macros.  Next phase will
      get rid of internal use of names for looking up catalogs and indexes;
      but this completes the changes forcing an initdb, so it looks like a
      good place to commit.
      Along the way, I made the shared relations (pg_database etc) not be
      'bootstrap' relations any more, so as to reduce the number of hardwired
      entries and simplify changing those relations in future.  I'm not
      sure whether they ever really needed to be handled as bootstrap
      relations, but it seems to work fine to not do so now.
      7c13781e
  19. 12 4月, 2005 1 次提交
    • T
      Add aggsortop column to pg_aggregate, so that MIN/MAX optimization can · 2e7a6889
      Tom Lane 提交于
      be supported for all datatypes.  Add CREATE AGGREGATE and pg_dump support
      too.  Add specialized min/max aggregates for bpchar, instead of depending
      on text's min/max, because otherwise the possible use of bpchar indexes
      cannot be recognized.
      initdb forced because of catalog changes.
      2e7a6889
  20. 01 4月, 2005 1 次提交
  21. 30 3月, 2005 1 次提交
    • T
      Add proallargtypes and proargmodes columns to pg_proc, as per my earlier · 0f085f6e
      Tom Lane 提交于
      proposal for OUT parameter support.  The columns don't actually *do*
      anything yet, they are just left NULLs.  But I thought I'd commit this
      part separately as a fairly pure example of the tasks needed when adding
      a column to pg_proc or one of the other core system tables.
      0f085f6e
  22. 29 3月, 2005 1 次提交
    • T
      Convert oidvector and int2vector into variable-length arrays. This · 70c9763d
      Tom Lane 提交于
      change saves a great deal of space in pg_proc and its primary index,
      and it eliminates the former requirement that INDEX_MAX_KEYS and
      FUNC_MAX_ARGS have the same value.  INDEX_MAX_KEYS is still embedded
      in the on-disk representation (because it affects index tuple header
      size), but FUNC_MAX_ARGS is not.  I believe it would now be possible
      to increase FUNC_MAX_ARGS at little cost, but haven't experimented yet.
      There are still a lot of vestigial references to FUNC_MAX_ARGS, which
      I will clean up in a separate pass.  However, getting rid of it
      altogether would require changing the FunctionCallInfoData struct,
      and I'm not sure I want to buy into that.
      70c9763d
  23. 28 3月, 2005 1 次提交
    • T
      First steps towards index scans with heap access decoupled from index · bf3dbb58
      Tom Lane 提交于
      access: define new index access method functions 'amgetmulti' that can
      fetch multiple TIDs per call.  (The functions exist but are totally
      untested as yet.)  Since I was modifying pg_am anyway, remove the
      no-longer-needed 'rel' parameter from amcostestimate functions, and
      also remove the vestigial amowner column that was creating useless
      work for Alvaro's shared-object-dependencies project.
      Initdb forced due to changes in pg_am.
      bf3dbb58
  24. 21 3月, 2005 1 次提交
    • T
      Convert index-related tuple handling routines from char 'n'/' ' to bool · ee4ddac1
      Tom Lane 提交于
      convention for isnull flags.  Also, remove the useless InsertIndexResult
      return struct from index AM aminsert calls --- there is no reason for
      the caller to know where in the index the tuple was inserted, and we
      were wasting a palloc cycle per insert to deliver this uninteresting
      value (plus nontrivial complexity in some AMs).
      I forced initdb because of the change in the signature of the aminsert
      routines, even though nothing really looks at those pg_proc entries...
      ee4ddac1
  25. 28 2月, 2005 1 次提交
  26. 27 2月, 2005 2 次提交
    • N
      Add explicit casts between int4 and boolean. Patch from Sean Chittenden, · 5285b357
      Neil Conway 提交于
      editorializing by Neil Conway. Catalog version bumped.
      5285b357
    • T
      Finish up the flat-files project: get rid of GetRawDatabaseInfo() hack · 0fc4ecf9
      Tom Lane 提交于
      in favor of looking at the flat file copy of pg_database during backend
      startup.  This should finally eliminate the various corner cases in which
      backend startup fails unexpectedly because it isn't able to distinguish
      live and dead tuples in pg_database.  Simplify locking on pg_database
      to be similar to the rules used with pg_shadow and pg_group, and eliminate
      FlushRelationBuffers operations that were used only to reduce the odds
      of failure of GetRawDatabaseInfo.
      initdb forced due to addition of a trigger to pg_database.
      0fc4ecf9
  27. 01 1月, 2005 1 次提交
    • P
      · 2ff50159
      PostgreSQL Daemon 提交于
      Tag appropriate files for rc3
      
      Also performed an initial run through of upgrading our Copyright date to
      extend to 2005 ... first run here was very simple ... change everything
      where: grep 1996-2004 && the word 'Copyright' ... scanned through the
      generated list with 'less' first, and after, to make sure that I only
      picked up the right entries ...
      2ff50159
  28. 08 10月, 2004 1 次提交
    • T
      Fix problems with SQL functions returning rowtypes that have dropped · a8487e15
      Tom Lane 提交于
      columns.  The returned tuple needs to have appropriate NULL columns
      inserted so that it actually matches the declared rowtype.  It seemed
      convenient to use a JunkFilter for this, so I made some cleanups and
      simplifications in the JunkFilter code to allow it to support this
      additional functionality.  (That in turn exposed a latent bug in
      nodeAppend.c, which is that it was returning a tuple slot whose
      descriptor didn't match its data.)  Also, move check_sql_fn_retval
      out of pg_proc.c and into functions.c, where it seems to more naturally
      belong.
      a8487e15
  29. 05 10月, 2004 2 次提交
  30. 29 8月, 2004 2 次提交
  31. 04 8月, 2004 1 次提交
    • T
      Add functions pg_start_backup, pg_stop_backup to create backup label · 58c41712
      Tom Lane 提交于
      and history files as per recent discussion.  While at it, remove
      pg_terminate_backend, since we have decided we do not have time during
      this release cycle to address the reliability concerns it creates.
      Split the 'Miscellaneous Functions' documentation section into
      'System Information Functions' and 'System Administration Functions',
      which hopefully will draw the eyes of those looking for such things.
      58c41712
  32. 13 7月, 2004 1 次提交
  33. 03 7月, 2004 2 次提交
    • T
      Add missing operators of the form interval-plus-datetime, as required for · e34082ee
      Tom Lane 提交于
      better SQL compliance in this area, per recent discussion.  Mark related
      operators as commutators where possible.  (The system doesn't actually care
      about commutator marking for operators not returning boolean, at the moment,
      but this seems forward-thinking and besides it made it easier to verify
      that we hadn't missed any.)
      Also, remove interval-minus-time and interval-minus-timetz operators.
      I'm not sure how these got in, but they are nonstandard and had very
      obviously broken behavior.  (minus is not commutative in anyone's book.)
      I doubt anyone had ever used 'em, because we'd surely have gotten a bug
      report about it if so.
      e34082ee
    • J
      Andreas Pflug wrote: · 0b89d261
      Joe Conway 提交于
       From an idea of Bruce, the attached patch implements the function
       pg_tablespace_databases(oid) RETURNS SETOF oid
       which delivers as set of database oids having objects in the selected
       tablespace, enabling an admin to examine only the databases affecting
       the tablespace for objects instead of scanning all of them.
      
      initdb forced
      0b89d261
  34. 26 6月, 2004 1 次提交
  35. 16 6月, 2004 1 次提交
    • T
      Represent type-specific length coercion functions as pg_cast entries, · d70a42e6
      Tom Lane 提交于
      eliminating the former hard-wired convention about their names.  Allow
      pg_cast entries to represent both type coercion and length coercion in
      a single step --- this is represented by a function that takes an
      extra typmod argument, just like a length coercion function.  This
      nicely merges the type and length coercion mechanisms into something
      at least a little cleaner than we had before.  Make use of the single-
      coercion-step behavior to fix integer-to-bit coercion so that coercing
      to bit(n) yields the rightmost n bits of the integer instead of the
      leftmost n bits.  This should fix recurrent complaints about the odd
      behavior of this coercion.  Clean up the documentation of the bit string
      functions, and try to put it where people might actually find it.
      Also, get rid of the unreliable heuristics in ruleutils.c about whether
      to display nested coercion steps; instead require parse_coerce.c to
      label them properly in the first place.
      d70a42e6
  36. 14 6月, 2004 1 次提交