1. 16 3月, 2002 1 次提交
  2. 12 3月, 2002 1 次提交
    • T
      Restructure representation of join alias variables. An explicit JOIN · 6eeb95f0
      Tom Lane 提交于
      now has an RTE of its own, and references to its outputs now are Vars
      referencing the JOIN RTE, rather than CASE-expressions.  This allows
      reverse-listing in ruleutils.c to use the correct alias easily, rather
      than painfully reverse-engineering the alias namespace as it used to do.
      Also, nested FULL JOINs work correctly, because the result of the inner
      joins are simple Vars that the planner can cope with.  This fixes a bug
      reported a couple times now, notably by Tatsuo on 18-Nov-01.  The alias
      Vars are expanded into COALESCE expressions where needed at the very end
      of planning, rather than during parsing.
      Also, beginnings of support for showing plan qualifier expressions in
      EXPLAIN.  There are probably still cases that need work.
      initdb forced due to change of stored-rule representation.
      6eeb95f0
  3. 10 3月, 2002 2 次提交
  4. 08 3月, 2002 2 次提交
  5. 07 3月, 2002 2 次提交
    • B
      I've attached a patch which implements Bob Jenkin's hash function for · 7ab74673
      Bruce Momjian 提交于
      PostgreSQL. This hash function replaces the one used by hash indexes and
      the catalog cache. Hash joins use a different, relatively poor-quality
      hash function, but I'll fix that later.
      
      As suggested by Tom Lane, this patch also changes the size of the fixed
      hash table used by the catalog cache to be a power-of-2 (instead of a
      prime: I chose 256 instead of 257). This allows the catcache to lookup
      hash buckets using a simple bitmask. This should improve the performance
      of the catalog cache slightly, since the previous method (modulo a
      prime) was slow.
      
      In my tests, this improves the performance of hash indexes by between 4%
      and 8%; the performance when using btree indexes or seqscans is
      basically unchanged.
      
      Neil Conway <neilconway@rogers.com>
      7ab74673
    • B
      Ok. Updated patch attached. · 01c76f74
      Bruce Momjian 提交于
      - domain.patch -> source patch against pgsql in cvs
      - drop_domain.sgml and create_domain.sgml -> New doc/src/sgml/ref docs
      
      - dominfo.txt -> basic domain related queries I used for testing
      [ ADDED TO /doc]
      
      Enables domains of array elements -> CREATE DOMAIN dom int4[3][2];
      
      Uses a typbasetype column to describe the origin of the domain.
      
      Copies data to attnotnull rather than processing in execMain().
      
      Some documentation differences from earlier.
      
      If this is approved, I'll start working on pg_dump, and a \dD <domain>
      option in psql, and regression tests.  I don't really feel like doing
      those until the system table structure settles for pg_type.
      
      
      CHECKS when added, will also be copied to to the table attributes.  FK
      Constraints (if I ever figure out how) will be done similarly.  Both
      will lbe handled by MergeDomainAttributes() which is called shortly
      before MergeAttributes().
      
      Rod Taylor
      01c76f74
  6. 06 3月, 2002 2 次提交
    • B
      Improve elog descriptions. · 4e15b923
      Bruce Momjian 提交于
      4e15b923
    • B
      Change made to elog: · 92288a1c
      Bruce Momjian 提交于
      o  Change all current CVS messages of NOTICE to WARNING.  We were going
      to do this just before 7.3 beta but it has to be done now, as you will
      see below.
      
      o Change current INFO messages that should be controlled by
      client_min_messages to NOTICE.
      
      o Force remaining INFO messages, like from EXPLAIN, VACUUM VERBOSE, etc.
      to always go to the client.
      
      o Remove INFO from the client_min_messages options and add NOTICE.
      
      Seems we do need three non-ERROR elog levels to handle the various
      behaviors we need for these messages.
      
      Regression passed.
      92288a1c
  7. 05 3月, 2002 3 次提交
    • B
      > Tatsuo Ishii wrote: · a8bd7e1c
      Bruce Momjian 提交于
      > > > > It was made to cope with encoding such as an Asian bloc in 7.2Beta2.
      > > > >
      > > > > Added ServerEncoding
      > > > >         Korean (JOHAB), Thai (WIN874),
      > > > >         Vietnamese (TCVN), Arabic (WIN1256)
      > > > >
      > > > > Added ClientEncoding
      > > > >         Simplified Chinese (GBK), Korean (UHC)
      > > > >
      > > > >
      > > > >
      > http://www.sankyo-unyu.co.jp/Pool/postgresql-7.2b2.newencoding.diff.tar.gz
      > > > > (608K)
      > > >
      > > > Looks good.  I need some people to review this for me.
      > >
      > > For me they look good too. The only missing part is a
      > > documentation. I will ask him to write it up. If he couldn't, I will
      > > do it for him.
      > > > The diff is 3mb
      > > > but appears to address only additions to multibyte.  I have attached a
      > > > list of files it modifies.  Also, look at the sizes of the mb/
      > > > directory.  It is getting large:
      > > >
      > > >   4       ./CVS
      > > >   6       ./Unicode/CVS
      > > >   3433    ./Unicode
      > > >   6197    .
      > >
      > > Yes. We definitely need the on-the-fly encoding addition capability:
      > > i.e. CREATE CHRACTER SET in the future...
      > > --
      > > Tatsuo Ishii
      > >
      > >
      
      Address chainge.
      
      http://www.sankyo-unyu.co.jp/Pool/postgresql-7.2.newencoding.diff.gz
      
      Add PsqlODBC and document ...etc patch.
      
      Eiji Tokuya
      a8bd7e1c
    • B
      I attach a version of my toast-slicing patch, against current CVS · 03194432
      Bruce Momjian 提交于
      (current as of a few hours ago.)
      
      This patch:
      
      1. Adds PG_GETARG_xxx_P_SLICE() macros and associated support routines.
      
      2. Adds routines in src/backend/access/tuptoaster.c for fetching only
      necessary chunks of a toasted value. (Modelled on latest changes to
      assume chunks are returned in order).
      
      3. Amends text_substr and bytea_substr to use new methods. It now
      handles multibyte cases -and should still lead to a performance
      improvement in the multibyte case where the substring is near the
      beginning of the string.
      
      4. Added new command: ALTER TABLE tabname ALTER COLUMN colname SET
      STORAGE {PLAIN | EXTERNAL | EXTENDED | MAIN} to parser and documented in
      alter-table.sgml. (NB I used ColId as the item type for the storage
      mode string, rather than a new production - I hope this makes sense!).
      All this does is sets attstorage for the specified column.
      
      4. AlterTableAlterColumnStatistics is now AlterTableAlterColumnFlags and
      handles both statistics and storage (it uses the subtype code to
      distinguish). The previous version of my patch also re-arranged other
      code in backend/commands/command.c but I have dropped that from this
      patch.(I plan to return to it separately).
      
      5. Documented new macros (and also the PG_GETARG_xxx_P_COPY macros) in
      xfunc.sgml. ref/alter_table.sgml also contains documentation for ALTER
      COLUMN SET STORAGE.
      
      John Gray
      03194432
    • B
      Add PQunescapeBytea libpq function. · 294f0d4b
      Bruce Momjian 提交于
      Everyone using libpq and bytea is probably having to invent this wheel..
      
      Patrick Welche
      294f0d4b
  8. 04 3月, 2002 2 次提交
    • T
      Further work on elog cleanup: fix some bogosities in elog's logic about · 36f693ec
      Tom Lane 提交于
      when to send what to which, prevent recursion by introducing new COMMERROR
      elog level for client-communication problems, get rid of direct writes
      to stderr in backend/libpq files, prevent non-error elogs from going to
      client during the authentication cycle.
      36f693ec
    • T
      Catcaches can now store negative entries as well as positive ones, to · 26ac2171
      Tom Lane 提交于
      speed up repetitive failed searches; per pghackers discussion in late
      January.  inval.c logic substantially simplified, since we can now treat
      inserts and deletes alike as far as inval events are concerned.  Some
      repair work needed in heap_create_with_catalog, which turns out to have
      been doing CommandCounterIncrement at a point where the new relation has
      non-self-consistent catalog entries.  With the new inval code, that
      resulted in assert failures during a relcache entry rebuild.
      26ac2171
  9. 03 3月, 2002 1 次提交
    • B
      Commit to match discussed elog() changes. Only update is that LOG is · a033daf5
      Bruce Momjian 提交于
      now just below FATAL in server_min_messages.  Added more text to
      highlight ordering difference between it and client_min_messages.
      
      ---------------------------------------------------------------------------
      
      REALLYFATAL => PANIC
      STOP => PANIC
      New INFO level the prints to client by default
      New LOG level the prints to server log by default
      Cause VACUUM information to print only to the client
      NOTICE => INFO where purely information messages are sent
      DEBUG => LOG for purely server status messages
      DEBUG removed, kept as backward compatible
      DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1 added
      DebugLvl removed in favor of new DEBUG[1-5] symbols
      New server_min_messages GUC parameter with values:
              DEBUG[5-1], INFO, NOTICE, ERROR, LOG, FATAL, PANIC
      New client_min_messages GUC parameter with values:
              DEBUG[5-1], LOG, INFO, NOTICE, ERROR, FATAL, PANIC
      Server startup now logged with LOG instead of DEBUG
      Remove debug_level GUC parameter
      elog() numbers now start at 10
      Add test to print error message if older elog() values are passed to elog()
      Bootstrap mode now has a -d that requires an argument, like postmaster
      a033daf5
  10. 02 3月, 2002 1 次提交
  11. 01 3月, 2002 2 次提交
  12. 28 2月, 2002 1 次提交
    • T
      Clean up BeginCommand and related routines. BeginCommand and EndCommand · 6779c55c
      Tom Lane 提交于
      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
  13. 27 2月, 2002 1 次提交
    • T
      Restructure command-completion-report code so that there is just one · 56ee2ecb
      Tom Lane 提交于
      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
  14. 26 2月, 2002 1 次提交
  15. 25 2月, 2002 2 次提交
  16. 23 2月, 2002 2 次提交
  17. 22 2月, 2002 1 次提交
  18. 20 2月, 2002 1 次提交
    • T
      A bunch of changes aimed at reducing backend startup time... · 78634044
      Tom Lane 提交于
      Improve 'pg_internal.init' relcache entry preload mechanism so that it is
      safe to use for all system catalogs, and arrange to preload a realistic
      set of system-catalog entries instead of only the three nailed-in-cache
      indexes that were formerly loaded this way.  Fix mechanism for deleting
      out-of-date pg_internal.init files: this must be synchronized with transaction
      commit, not just done at random times within transactions.  Drive it off
      relcache invalidation mechanism so that no special-case tests are needed.
      
      Cache additional information in relcache entries for indexes (their pg_index
      tuples and index-operator OIDs) to eliminate repeated lookups.  Also cache
      index opclass info at the per-opclass level to avoid repeated lookups during
      relcache load.
      
      Generalize 'systable scan' utilities originally developed by Hiroshi,
      move them into genam.c, use in a number of places where there was formerly
      ugly code for choosing either heap or index scan.  In particular this allows
      simplification of the logic that prevents infinite recursion between syscache
      and relcache during startup: we can easily switch to heapscans in relcache.c
      when and where needed to avoid recursion, so IndexScanOK becomes simpler and
      does not need any expensive initialization.
      
      Eliminate useless opening of a heapscan data structure while doing an indexscan
      (this saves an mdnblocks call and thus at least one kernel call).
      78634044
  19. 19 2月, 2002 1 次提交
  20. 14 2月, 2002 1 次提交
  21. 29 1月, 2002 1 次提交
  22. 23 1月, 2002 1 次提交
  23. 17 1月, 2002 1 次提交
    • T
      TOAST needs to do at least minimal time-qual checking in order not to · cf97080f
      Tom Lane 提交于
      mess up after an aborted VACUUM FULL, per today's pghackers discussion.
      Add a suitable HeapTupleSatisfiesToast routine.  Remove useless special-
      case test in HeapTupleSatisfiesVisibility macro for xmax =
      BootstrapTransactionId; perhaps that was needed at one time, but it's
      a waste of cycles now, not to mention actively wrong for SnapshotAny.
      Along the way, add some much-needed comments to tqual.c, and simplify
      toast_fetch_datum, which no longer needs to assume it may see chunks
      out-of-order.
      cf97080f
  24. 16 1月, 2002 1 次提交
    • T
      Add more sanity-checking to PageAddItem and PageIndexTupleDelete, · aa00e613
      Tom Lane 提交于
      to prevent spreading of corruption when page header pointers are bad.
      Merge PageZero into PageInit, since it was never used separately, and
      remove separate memset calls used at most other PageInit call points.
      Remove IndexPageCleanup, which wasn't used at all.
      aa00e613
  25. 13 1月, 2002 1 次提交
  26. 12 1月, 2002 1 次提交
    • T
      Repair bugs in declarations of routines to add timestamptz and interval. · 192061e4
      Thomas G. Lockhart 提交于
       Thanks to Bruce for spotting it and Tom Lane for diagnosing it.
      Since horology test output is changing anyway, add some date/time input
       tests to horology.sql. Some of these should move to the tests for the
       individual data types, and we perhaps should add an entire new test
       for "timezone" to allow manipulating the current time zone without
       risking damage to the results of other tests.
      192061e4
  27. 02 1月, 2002 1 次提交
  28. 01 1月, 2002 1 次提交
  29. 30 12月, 2001 1 次提交
    • T
      Rework the date/time parsing to tighten up some cases and to enable other · b5e23db4
      Thomas G. Lockhart 提交于
       cases which should have worked but did not.
      Now supports julian day (J2452271), ISO time labels (T040506) and various
       combinations of spaces and run-togethers of dates, times, and time zones.
      All regression tests pass, and I have more tests to add after the 7.2
       release (don't want to require changes to the ancillary horology result
       files until after then).
      b5e23db4
  30. 11 12月, 2001 1 次提交