1. 18 Jul, 2002 1 commit
    • Peter Eisentraut's avatar
      pg_cast table, and standards-compliant CREATE/DROP CAST commands, plus · 97377048
      Peter Eisentraut authored
      extension to create binary compatible casts.  Includes dependency tracking
      as well.
      
      pg_proc.proimplicit is now defunct, but will be removed in a separate
      commit.
      
      pg_dump provides a migration path from the previous scheme to declare
      casts.  Dumping binary compatible casts is currently impossible, though.
      97377048
  2. 18 May, 2002 1 commit
  3. 25 Apr, 2002 1 commit
  4. 11 Apr, 2002 1 commit
    • Tom Lane's avatar
      Restructure representation of aggregate functions so that they have pg_proc · 902a6a0a
      Tom Lane authored
      entries, per pghackers discussion.  This fixes aggregates to live in
      namespaces, and also simplifies/speeds up lookup in parse_func.c.
      Also, add a 'proimplicit' flag to pg_proc that controls whether a type
      coercion function may be invoked implicitly, or only explicitly.  The
      current settings of these flags are more permissive than I would like,
      but we will need to debate and refine the behavior; for now, I avoided
      breaking regression tests as much as I could.
      902a6a0a
  5. 05 Apr, 2002 1 commit
  6. 04 Apr, 2002 1 commit
    • Bruce Momjian's avatar
      Authentication improvements: · 43a3543a
      Bruce Momjian authored
      A new pg_hba.conf column, USER
      Allow specifiction of lists of users separated by commas
      Allow group names specified by +
      Allow include files containing lists of users specified by @
      Allow lists of databases, and database files
      Allow samegroup in database column to match group name matching dbname
      Removal of secondary password files
      Remove pg_passwd utility
      Lots of code cleanup in user.c and hba.c
      New data/global/pg_pwd format
      New data/global/pg_group file
      43a3543a
  7. 30 Sep, 2001 1 commit
  8. 28 Sep, 2001 1 commit
  9. 21 Aug, 2001 1 commit
    • Tom Lane's avatar
      Restructure pg_opclass, pg_amop, and pg_amproc per previous discussions in · f933766b
      Tom Lane authored
      pgsql-hackers.  pg_opclass now has a row for each opclass supported by each
      index AM, not a row for each opclass name.  This allows pg_opclass to show
      directly whether an AM supports an opclass, and furthermore makes it possible
      to store additional information about an opclass that might be AM-dependent.
      pg_opclass and pg_amop now store "lossy" and "haskeytype" information that we
      previously expected the user to remember to provide in CREATE INDEX commands.
      Lossiness is no longer an index-level property, but is associated with the
      use of a particular operator in a particular index opclass.
      
      Along the way, IndexSupportInitialize now uses the syscaches to retrieve
      pg_amop and pg_amproc entries.  I find this reduces backend launch time by
      about ten percent, at the cost of a couple more special cases in catcache.c's
      IndexScanOK.
      
      Initial work by Oleg Bartunov and Teodor Sigaev, further hacking by Tom Lane.
      
      initdb forced.
      f933766b
  10. 14 Aug, 2001 1 commit
    • Tom Lane's avatar
      sum() on int2 and int4 columns now uses an int8, not numeric, accumulator · 5f7c2bdb
      Tom Lane authored
      for speed reasons; its result type also changes to int8.  avg() on these
      datatypes now accumulates the running sum in int8 for speed; but we still
      deliver the final result as numeric, so that fractional accuracy is
      preserved.
      
      count() now counts and returns in int8, not int4.  I am a little nervous
      about this possibly breaking users' code, but there didn't seem to be
      a strong sentiment for avoiding the problem.  If we get complaints during
      beta, we can change count back to int4 and add a "count8" aggregate.
      For that matter, users can do it for themselves with a simple CREATE
      AGGREGATE command; the int4inc function is still present, so no C hacking
      is needed.
      
      Also added max() and min() aggregates for OID that do proper unsigned
      comparison, instead of piggybacking on int4 aggregates.
      
      initdb forced.
      5f7c2bdb
  11. 10 Aug, 2001 1 commit
    • Tom Lane's avatar
      Make OIDs optional, per discussions in pghackers. WITH OIDS is still the · bf56f075
      Tom Lane authored
      default, but OIDS are removed from many system catalogs that don't need them.
      Some interesting side effects: TOAST pointers are 20 bytes not 32 now;
      pg_description has a three-column key instead of one.
      
      Bugs fixed in passing: BINARY cursors work again; pg_class.relhaspkey
      has some usefulness; pg_dump dumps comments on indexes, rules, and
      triggers in a valid order.
      
      initdb forced.
      bf56f075
  12. 15 Jul, 2001 1 commit
    • Tom Lane's avatar
      Restructure index AM interface for index building and index tuple deletion, · c8076f09
      Tom Lane authored
      per previous discussion on pghackers.  Most of the duplicate code in
      different AMs' ambuild routines has been moved out to a common routine
      in index.c; this means that all index types now do the right things about
      inserting recently-dead tuples, etc.  (I also removed support for EXTEND
      INDEX in the ambuild routines, since that's about to go away anyway, and
      it cluttered the code a lot.)  The retail indextuple deletion routines have
      been replaced by a "bulk delete" routine in which the indexscan is inside
      the access method.  I haven't pushed this change as far as it should go yet,
      but it should allow considerable simplification of the internal bookkeeping
      for deletions.  Also, add flag columns to pg_am to eliminate various
      hardcoded tests on AM OIDs, and remove unused pg_am columns.
      
      Fix rtree and gist index types to not attempt to store NULLs; before this,
      gist usually crashed, while rtree managed not to crash but computed wacko
      bounding boxes for NULL entries (which might have had something to do with
      the performance problems we've heard about occasionally).
      
      Add AtEOXact routines to hash, rtree, and gist, all of which have static
      state that needs to be reset after an error.  We discovered this need long
      ago for btree, but missed the other guys.
      
      Oh, one more thing: concurrent VACUUM is now the default.
      c8076f09
  13. 12 Jun, 2001 1 commit
    • Tom Lane's avatar
      Clean up various to-do items associated with system indexes: · 1d584f97
      Tom Lane authored
      pg_database now has unique indexes on oid and on datname.
      pg_shadow now has unique indexes on usename and on usesysid.
      pg_am now has unique index on oid.
      pg_opclass now has unique index on oid.
      pg_amproc now has unique index on amid+amopclaid+amprocnum.
      Remove pg_rewrite's unnecessary index on oid, delete unused RULEOID syscache.
      Remove index on pg_listener and associated syscache for performance reasons
      (caching rows that are certain to change before you need 'em again is
      rather pointless).
      Change pg_attrdef's nonunique index on adrelid into a unique index on
      adrelid+adnum.
      
      Fix various incorrect settings of pg_class.relisshared, make that the
      primary reference point for whether a relation is shared or not.
      IsSharedSystemRelationName() is now only consulted to initialize relisshared
      during initial creation of tables and indexes.  In theory we might now
      support shared user relations, though it's not clear how one would get
      entries for them into pg_class &etc of multiple databases.
      
      Fix recently reported bug that pg_attribute rows created for an index all have
      the same OID.  (Proof that non-unique OID doesn't matter unless it's
      actually used to do lookups ;-))
      
      There's no need to treat pg_trigger, pg_attrdef, pg_relcheck as bootstrap
      relations.  Convert them into plain system catalogs without hardwired
      entries in pg_class and friends.
      
      Unify global.bki and template1.bki into a single init script postgres.bki,
      since the alleged distinction between them was misleading and pointless.
      Not to mention that it didn't work for setting up indexes on shared
      system relations.
      
      Rationalize locking of pg_shadow, pg_group, pg_attrdef (no need to use
      AccessExclusiveLock where ExclusiveLock or even RowExclusiveLock will do).
      Also, hold locks until transaction commit where necessary.
      1d584f97
  14. 20 May, 2001 1 commit
    • Tom Lane's avatar
      Modify optimizer data structures so that IndexOptInfo lists built for · be03eb25
      Tom Lane authored
      create_index_paths are not immediately discarded, but are available for
      subsequent planner work.  This allows avoiding redundant syscache lookups
      in several places.  Change interface to operator selectivity estimation
      procedures to allow faster and more flexible estimation.
      Initdb forced due to change of pg_proc entries for selectivity functions!
      be03eb25
  15. 15 May, 2001 1 commit
  16. 14 May, 2001 1 commit
  17. 07 May, 2001 1 commit
    • Tom Lane's avatar
      Rewrite of planner statistics-gathering code. ANALYZE is now available as · f905d65e
      Tom Lane authored
      a separate statement (though it can still be invoked as part of VACUUM, too).
      pg_statistic redesigned to be more flexible about what statistics are
      stored.  ANALYZE now collects a list of several of the most common values,
      not just one, plus a histogram (not just the min and max values).  Random
      sampling is used to make the process reasonably fast even on very large
      tables.  The number of values and histogram bins collected is now
      user-settable via an ALTER TABLE command.
      
      There is more still to do; the new stats are not being used everywhere
      they could be in the planner.  But the remaining changes for this project
      should be localized, and the behavior is already better than before.
      
      A not-very-related change is that sorting now makes use of btree comparison
      routines if it can find one, rather than invoking '<' twice.
      f905d65e
  18. 21 Nov, 2000 1 commit
  19. 14 Nov, 2000 1 commit
    • Tom Lane's avatar
      Extend CREATE DATABASE to allow selection of a template database to be · 2cf48ca0
      Tom Lane authored
      cloned, rather than always cloning template1.  Modify initdb to generate
      two identical databases rather than one, template0 and template1.
      Connections to template0 are disallowed, so that it will always remain
      in its virgin as-initdb'd state.  pg_dumpall now dumps databases with
      restore commands that say CREATE DATABASE foo WITH TEMPLATE = template0.
      This allows proper behavior when there is user-added data in template1.
      initdb forced!
      2cf48ca0
  20. 24 Oct, 2000 1 commit
    • Tom Lane's avatar
      Major overhaul of large-object implementation, by Denis Perchine with · 4f44aa04
      Tom Lane authored
      kibitzing from Tom Lane.  Large objects are now all stored in a single
      system relation "pg_largeobject" --- no more xinv or xinx files, no more
      relkind 'l'.  This should offer substantial performance improvement for
      large numbers of LOs, since there won't be directory bloat anymore.
      It'll also fix problems like running out of locktable space when you
      access thousands of LOs in one transaction.
      Also clean up cruft in read/write routines.  LOs with "holes" in them
      (never-written byte ranges) now work just like Unix files with holes do:
      a hole reads as zeroes but doesn't occupy storage space.
      INITDB forced!
      4f44aa04
  21. 21 Aug, 2000 1 commit
  22. 30 Jul, 2000 1 commit
    • Tom Lane's avatar
      Type lztext is toast. · 8f9fa0e1
      Tom Lane authored
      (Sorry, couldn't help it...)
      
      Removed type filename as well, since it's unused and probably useless.
      INITDB FORCED, because pg_rewrite columns are now plain text again.
      8f9fa0e1
  23. 28 Jul, 2000 1 commit
    • Tom Lane's avatar
      Add int2-vs-int8 comparison operators. These are now necessary because · d2d7865b
      Tom Lane authored
      the planner may try to generate them as a result of transitivity of the
      existing int2-vs-int4 and int4-vs-int8 operators.  In fact, it is now
      necessary that mergejoinable cross-datatype operators form closed sets.
      Add an opr_sanity regress test to detect missing operators.
      d2d7865b
  24. 18 Jul, 2000 1 commit
  25. 17 Jul, 2000 1 commit
    • Tom Lane's avatar
      Revise aggregate functions per earlier discussions in pghackers. · bec98a31
      Tom Lane authored
      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
  26. 19 Jun, 2000 1 commit
  27. 05 Jun, 2000 1 commit
  28. 22 Jan, 2000 1 commit
  29. 05 Jan, 2000 1 commit
  30. 21 Dec, 1999 1 commit
  31. 30 Sep, 1999 1 commit
  32. 06 Sep, 1999 1 commit
    • Tom Lane's avatar
      Mark bpchareq not hashjoinable, since it strips trailing blanks · d2f7d1f3
      Tom Lane authored
      before comparison; if fields being joined are different widths then hashing
      will yield wrong answer.  Also, remove hashjoinable mark from all uses of
      array_eq, because array structures may have padding bytes between elements
      and the pad bytes are of uncertain content.  This could be revisited if
      array code is cleaned up.
      Modify opr_sanity regress test to complain if array_eq operator is marked
      hashjoinable.
      d2f7d1f3
  33. 12 May, 1999 1 commit
  34. 07 Apr, 1999 2 commits
  35. 29 Mar, 1999 1 commit
    • Tom Lane's avatar
      Modify fmgr so that internal name (compiler name) of a built-in · c537d429
      Tom Lane authored
      function is found in prosrc field of pg_proc, not proname.  This allows
      multiple aliases of a built-in to all be implemented as direct builtins,
      without needing a level of indirection through an SQL function.  Replace
      existing SQL alias functions with builtin entries accordingly.
      Save a few K by not storing string names of builtin functions in fmgr's
      internal table (if you really want 'em, get 'em from pg_proc...).
      Update opr_sanity with a few more cross-checks.
      c537d429
  36. 28 Mar, 1999 1 commit
  37. 01 Mar, 1999 1 commit
    • Tom Lane's avatar
      Executor no longer cares about mergejoinop, mergerightorder, mergeleftorder, · b204d10c
      Tom Lane authored
      so remove them from MergeJoin node.  Hack together a partial
      solution for commuted mergejoin operators --- yesterday
      a mergejoin int4 = int8 would crash if the planner decided to
      commute it, today it works.  The planner's representation of
      mergejoins really needs a rewrite though.
      Also, further testing of mergejoin ops in opr_sanity regress test.
      b204d10c
  38. 28 Feb, 1999 1 commit
  39. 29 Oct, 1998 1 commit