1. 17 10月, 2000 1 次提交
  2. 06 10月, 2000 2 次提交
    • B
      Add proofreader's changes to docs. · b32685a9
      Bruce Momjian 提交于
      Fix misspelling of disbursion to dispersion.
      b32685a9
    • T
      Reimplementation of UNION/INTERSECT/EXCEPT. INTERSECT/EXCEPT now meet the · 05e3d0ee
      Tom Lane 提交于
      SQL92 semantics, including support for ALL option.  All three can be used
      in subqueries and views.  DISTINCT and ORDER BY work now in views, too.
      This rewrite fixes many problems with cross-datatype UNIONs and INSERT/SELECT
      where the SELECT yields different datatypes than the INSERT needs.  I did
      that by making UNION subqueries and SELECT in INSERT be treated like
      subselects-in-FROM, thereby allowing an extra level of targetlist where the
      datatype conversions can be inserted safely.
      INITDB NEEDED!
      05e3d0ee
  3. 30 9月, 2000 1 次提交
    • T
      Subselects in FROM clause, per ISO syntax: FROM (SELECT ...) [AS] alias. · 3a94e789
      Tom Lane 提交于
      (Don't forget that an alias is required.)  Views reimplemented as expanding
      to subselect-in-FROM.  Grouping, aggregates, DISTINCT in views actually
      work now (he says optimistically).  No UNION support in subselects/views
      yet, but I have some ideas about that.  Rule-related permissions checking
      moved out of rewriter and into executor.
      INITDB REQUIRED!
      3a94e789
  4. 13 9月, 2000 1 次提交
  5. 12 9月, 2000 1 次提交
    • B
      This patch implements a different "relkind" · 264c0682
      Bruce Momjian 提交于
      for views. Views are now have a "relkind" of
      RELKIND_VIEW instead of RELKIND_RELATION.
      
      Also, views no longer have actual heap storage
      files.
      
      The following changes were made
      
      1. CREATE VIEW sets the new relkind
      
      2. The executor complains if a DELETE or
              INSERT references a view.
      
      3. DROP RULE complains if an attempt is made
              to delete a view SELECT rule.
      
      4. CREATE RULE "_RETmytable" AS ON SELECT TO mytable DO INSTEAD ...
              1. checks to make sure mytable is empty.
              2. sets the relkind to RELKIND_VIEW.
              3. deletes the heap storage files.
      5. LOCK myview is not allowed. :)
      
      
      6. the regression test type_sanity was changed to
              account for the new relkind value.
      
      7. CREATE INDEX ON myview ... is not allowed.
      
      8. VACUUM myview is not allowed.
              VACUUM automatically skips views when do the entire
              database.
      
      9. TRUNCATE myview is not allowed.
      
      
      THINGS LEFT TO THINK ABOUT
      
      o pg_views
      
      o pg_dump
      
      o pgsql (\d \dv)
      o Do we really want to be able to inherit from views?
      
      o Is 'DROP TABLE myview' OK?
      
      --
      Mark Hollomon
      264c0682
  6. 06 9月, 2000 1 次提交
    • P
      Code cleanup of user name and user id handling in the backend. The current · 6dc24961
      Peter Eisentraut 提交于
      user is now defined in terms of the user id, the user name is only computed
      upon request (for display purposes). This is kind of the opposite of the
      previous state, which would maintain the user name and compute the user id
      for permission checks.
      
      Besides perhaps saving a few cycles (integer vs string), this now creates a
      single point of attack for changing the user id during a connection, for
      purposes of "setuid" functions, etc.
      6dc24961
  7. 01 9月, 2000 1 次提交
  8. 25 8月, 2000 1 次提交
  9. 24 8月, 2000 1 次提交
  10. 22 8月, 2000 2 次提交
    • T
      Fix a many-legged critter reported by chifungfan@yahoo.com: under the · 0147b193
      Tom Lane 提交于
      right circumstances a hash join executed as a DECLARE CURSOR/FETCH
      query would crash the backend.  Problem as seen in current sources was
      that the hash tables were stored in a context that was a child of
      TransactionCommandContext, which got zapped at completion of the FETCH
      command --- but cursor cleanup executed at COMMIT expected the tables
      to still be valid.  I haven't chased down the details as seen in 7.0.*
      but I'm sure it's the same general problem.
      0147b193
    • T
      Move pg_checkretval out of the planner (where it never belonged) into · 7893462e
      Tom Lane 提交于
      pg_proc.c (where it's actually used).  Fix it to correctly handle tlists
      that contain resjunk target items, and improve error messages.  This
      addresses bug reported by Krupnikov 6-July-00.
      7893462e
  11. 13 8月, 2000 1 次提交
    • T
      Clean up handling of variable-free qual clauses. System now does the · 37168b8d
      Tom Lane 提交于
      right thing with variable-free clauses that contain noncachable functions,
      such as 'WHERE random() < 0.5' --- these are evaluated once per
      potential output tuple.  Expressions that contain only Params are
      now candidates to be indexscan quals --- for example, 'var = ($1 + 1)'
      can now be indexed.  Cope with RelabelType nodes atop potential indexscan
      variables --- this oversight prevents 7.0.* from recognizing some
      potentially indexscanable situations.
      37168b8d
  12. 08 8月, 2000 1 次提交
    • T
      Remove 'func_tlist' from Func expression nodes, likewise 'param_tlist' · 62e29fe2
      Tom Lane 提交于
      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
  13. 06 8月, 2000 1 次提交
  14. 04 8月, 2000 1 次提交
    • T
      Modify heap_open()/heap_openr() API per pghackers discussion of 11 July. · 61aca818
      Tom Lane 提交于
      These two routines will now ALWAYS elog() on failure, whether you ask for
      a lock or not.  If you really want to get a NULL return on failure, call
      the new routines heap_open_nofail()/heap_openr_nofail().  By my count there
      are only about three places that actually want that behavior.  There were
      rather more than three places that were missing the check they needed to
      make under the old convention :-(.
      61aca818
  15. 26 7月, 2000 1 次提交
  16. 23 7月, 2000 1 次提交
    • T
      Further cleanup of array behavior. Slice assignments to arrays with · e4e6459c
      Tom Lane 提交于
      varlena elements work now.  Allow assignment to previously-nonexistent
      subscript position to extend array, but only for 1-D arrays and only
      if adjacent to existing positions (could do more if we had a way to
      represent nulls in arrays, but I don't want to tackle that now).
      Arrange for assignment of NULL to an array element in UPDATE to be a
      no-op, rather than setting the entire array to NULL as it used to.
      (Throwing an error would be a reasonable alternative, but it's never
      done that...)  Update regress test accordingly.
      e4e6459c
  17. 22 7月, 2000 1 次提交
    • T
      Arrays are toastable. (At least if you initdb, which I didn't force.) · d0e17e21
      Tom Lane 提交于
      Remove a bunch of crufty code for large-object-based arrays, which is
      superseded by TOAST and likely hasn't worked in a long time anyway.
      Clean up array code a little, and in particular eliminate its habit
      of scribbling on the input array (ie, modifying the input tuple :-().
      d0e17e21
  18. 17 7月, 2000 1 次提交
    • T
      Revise aggregate functions per earlier discussions in pghackers. · bec98a31
      Tom Lane 提交于
      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
  19. 15 7月, 2000 1 次提交
    • T
      Cleanup of code for creating index entries. Functional indexes with · 6bfe6403
      Tom Lane 提交于
      pass-by-ref data types --- eg, an index on lower(textfield) --- no longer
      leak memory during index creation or update.  Clean up a lot of redundant
      code ... did you know that copy, vacuum, truncate, reindex, extend index,
      and bootstrap each basically duplicated the main executor's logic for
      extracting information about an index and preparing index entries?
      Functional indexes should be a little faster now too, due to removal
      of repeated function lookups.
      CREATE INDEX 'opt_type' clause is deimplemented by these changes,
      but I haven't removed it from the parser yet (need to merge with
      Thomas' latest change set first).
      6bfe6403
  20. 12 7月, 2000 1 次提交
  21. 09 7月, 2000 1 次提交
  22. 06 7月, 2000 2 次提交
    • T
      Update textin() and textout() to new fmgr style. This is just phase · 40f64064
      Tom Lane 提交于
      one of updating the whole text datatype, but there are so dang many
      calls of these two routines that it seems worth a separate commit.
      40f64064
    • J
      Changed TOAST relations to have relkind RELKIND_TOASTVALUE. · 6534444d
      Jan Wieck 提交于
      Special handling of TOAST relations during VACUUM. TOAST relations
      are vacuumed while the lock on the master table is still active.
      The ANALYZE flag doesn't propagate to their vacuuming because the
      toaster access routines allways use index access ignoring stats, so
      why compute them at all.
      
      Protection of TOAST relations against normal INSERT/UPDATE/DELETE
      while offering SELECT for debugging purposes.
      
      Jan
      6534444d
  23. 05 7月, 2000 1 次提交
  24. 04 7月, 2000 1 次提交
    • T
      Make toast-table creation and deletion work somewhat reliably. · cdeca5f5
      Tom Lane 提交于
      Don't go through pg_exec_query_dest(), but directly to the execution
      routines.  Also, extend parameter lists so that there's no need to
      change the global setting of allowSystemTableMods, a hack that was
      certain to cause trouble in the event of any error.
      cdeca5f5
  25. 28 6月, 2000 1 次提交
    • T
      First phase of memory management rewrite (see backend/utils/mmgr/README · 1aebc361
      Tom Lane 提交于
      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
  26. 20 6月, 2000 1 次提交
  27. 19 6月, 2000 1 次提交
    • T
      Reimplement nodeMaterial to use a temporary BufFile (or even memory, if the · 1ee26b77
      Tom Lane 提交于
      materialized tupleset is small enough) instead of a temporary relation.
      This was something I was thinking of doing anyway for performance, and Jan
      says he needs it for TOAST because he doesn't want to cope with toasting
      noname relations.  With this change, the 'noname table' support in heap.c
      is dead code, and I have accordingly removed it.  Also clean up 'noname'
      plan handling in planner --- nonames are either sort or materialize plans,
      and it seems less confusing to handle them separately under those names.
      1ee26b77
  28. 18 6月, 2000 1 次提交
    • T
      Fix performance problems with pg_index lookups (see, for example, · d03a933e
      Tom Lane 提交于
      discussion of 5/19/00).  pg_index is now searched for indexes of a
      relation using an indexscan.  Moreover, this is done once and cached
      in the relcache entry for the relation, in the form of a list of OIDs
      for the indexes.  This list is used by the parser and executor to drive
      lookups in the pg_index syscache when they want to know the properties
      of the indexes.  Net result: index information will be fully cached
      for repetitive operations such as inserts.
      d03a933e
  29. 15 6月, 2000 2 次提交
  30. 13 6月, 2000 1 次提交
  31. 10 6月, 2000 1 次提交
  32. 09 6月, 2000 2 次提交
  33. 31 5月, 2000 1 次提交
    • P
      The heralded `Grand Unified Configuration scheme' (GUC) · 6a68f426
      Peter Eisentraut 提交于
      That means you can now set your options in either or all of $PGDATA/configuration,
      some postmaster option (--enable-fsync=off), or set a SET command. The list of
      options is in backend/utils/misc/guc.c, documentation will be written post haste.
      
      pg_options is gone, so is that pq_geqo config file. Also removed were backend -K,
      -Q, and -T options (no longer applicable, although -d0 does the same as -Q).
      
      Added to configure an --enable-syslog option.
      
      changed all callers from TPRINTF to elog(DEBUG)
      6a68f426
  34. 30 5月, 2000 2 次提交