1. 29 7月, 2000 1 次提交
  2. 28 7月, 2000 1 次提交
    • T
      Add int2-vs-int8 comparison operators. These are now necessary because · d2d7865b
      Tom Lane 提交于
      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
  3. 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
  4. 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
  5. 08 7月, 2000 3 次提交
  6. 06 7月, 2000 2 次提交
  7. 19 6月, 2000 1 次提交
  8. 18 6月, 2000 1 次提交
    • T
      Get rid of IndexIsUniqueNoCache() kluge by the simple expedient of · edf0b5f0
      Tom Lane 提交于
      passing the index-is-unique flag to index build routines (duh! ...
      why wasn't it done this way to begin with?).  Aside from eliminating
      an eyesore, this should save a few milliseconds in btree index creation
      because a full scan of pg_index is not needed any more.
      edf0b5f0
  9. 13 6月, 2000 1 次提交
  10. 12 6月, 2000 1 次提交
    • T
      Update sequence-related functions to new fmgr style. Remove downcasing, · 3477957b
      Tom Lane 提交于
      quote-stripping, and acl-checking tasks for these functions from the
      parser, and do them at function execution time instead.  This fixes
      the failure of pg_dump to produce correct output for nextval(Foo)
      used in a rule, and also eliminates the restriction that the argument
      of these functions must be a parse-time constant.
      3477957b
  11. 09 6月, 2000 1 次提交
  12. 05 6月, 2000 1 次提交
  13. 29 5月, 2000 2 次提交
  14. 16 4月, 2000 1 次提交
    • T
      Add new selectivity estimation functions for pattern-matching operators · 82849df6
      Tom Lane 提交于
      (LIKE and regexp matches).  These are not yet referenced in pg_operator,
      so by default the system will continue to use eqsel/neqsel.
      Also, tweak convert_to_scalar() logic so that common prefixes of strings
      are stripped off, allowing better accuracy when all strings in a table
      share a common prefix.
      82849df6
  15. 13 4月, 2000 1 次提交
  16. 08 4月, 2000 1 次提交
  17. 07 4月, 2000 1 次提交
    • T
      Add transcendental math functions (sine, cosine, etc) · a349733b
      Thomas G. Lockhart 提交于
      Add a random number generator and seed setter (random(), SET SEED)
      Fix up the interval*float8 math to carry partial months
       into the time field.
      Add float8*interval so we have symmetry in the available math.
      Fix the parser and define.c to accept SQL92 types as field arguments.
      Fix the parser to accept SQL92 types for CREATE TYPE, etc. This is
       necessary to allow...
      Bit/varbit support in contrib/bit cleaned up to compile and load
       cleanly. Still needs some work before final release.
      Implement the "SOME" keyword as a synonym for "ANY" per SQL92.
      Implement ascii(text), ichar(int4), repeat(text,int4) to help
       support the ODBC driver.
      Enable the TRUNCATE() function mapping in the ODBC driver.
      a349733b
  18. 24 3月, 2000 1 次提交
  19. 19 3月, 2000 1 次提交
  20. 15 3月, 2000 1 次提交
    • T
      Implement column aliases on views "CREATE VIEW name (collist)". · 64568100
      Thomas G. Lockhart 提交于
      Implement TIME WITH TIME ZONE type (timetz internal type).
      Remap length() for character strings to CHAR_LENGTH() for SQL92
       and to remove the ambiguity with geometric length() functions.
      Keep length() for character strings for backward compatibility.
      Shrink stored views by removing internal column name list from visible rte.
      Implement min(), max() for time and timetz data types.
      Implement conversion of TIME to INTERVAL.
      Implement abs(), mod(), fac() for the int8 data type.
      Rename some math functions to generic names:
       round(), sqrt(), cbrt(), pow(), etc.
      Rename NUMERIC power() function to pow().
      Fix int2 factorial to calculate result in int4.
      Enhance the Oracle compatibility function translate() to work with string
       arguments (from Edwin Ramirez).
      Modify pg_proc system table to remove OID holes.
      64568100
  21. 27 2月, 2000 1 次提交
  22. 24 2月, 2000 1 次提交
    • T
      Add numeric <-> int8 and numeric <-> int2 conversion functions, as well · 9110b33f
      Tom Lane 提交于
      as a unary minus operator for numeric.  Now that long numeric constants
      will get converted to NUMERIC in early parsing, it's essential to have
      numeric->int8 conversion to avoid 'can't convert' errors on undecorated
      int8 constants.  Threw in the rest for completeness while I was in the
      area.
      I did not force an initdb for this, since the system will still run
      without the new pg_proc/pg_operator entries.  Possibly I should've.
      9110b33f
  23. 21 2月, 2000 1 次提交
  24. 17 2月, 2000 2 次提交
    • T
      Finish repairing 6.5's problems with r-tree indexes: create appropriate · 598ea2c3
      Tom Lane 提交于
      selectivity functions and make the r-tree operators use them.  The
      estimation functions themselves are just stubs, unfortunately, but
      perhaps someday someone will make them compute realistic estimates.
      Change pg_am so that the optimizer can reliably tell the difference
      between ordered and unordered indexes --- before it would think that
      an r-tree index can be scanned in '<<' order, which is not right AFAIK.
      Repair broken negator links for network_sup and related ops.
      Initdb forced.  This might be my last initdb force for 7.0 ... hope so
      anyway ...
      598ea2c3
    • T
      Implement "date/time grand unification". · 41f1f5b7
      Thomas G. Lockhart 提交于
       Transform datetime and timespan into timestamp and interval.
       Deprecate datetime and timespan, though translate to new types in gram.y.
       Transform all datetime and timespan catalog entries into new types.
       Make "INTERVAL" reserved word allowed as a column identifier in gram.y.
       Remove dt.h, dt.c files, and retarget datetime.h, datetime.c as utility
        routines for all date/time types.
       date.{h,c} now deals with date, time types.
       timestamp.{h,c} now deals with timestamp, interval types.
       nabstime.{h,c} now deals with abstime, reltime, tinterval types.
      Make NUMERIC a known native type for purposes of type coersion. Not tested.
      41f1f5b7
  25. 16 2月, 2000 1 次提交
    • T
      New cost model for planning, incorporating a penalty for random page · b1577a7c
      Tom Lane 提交于
      accesses versus sequential accesses, a (very crude) estimate of the
      effects of caching on random page accesses, and cost to evaluate WHERE-
      clause expressions.  Export critical parameters for this model as SET
      variables.  Also, create SET variables for the planner's enable flags
      (enable_seqscan, enable_indexscan, etc) so that these can be controlled
      more conveniently than via PGOPTIONS.
      
      Planner now estimates both startup cost (cost before retrieving
      first tuple) and total cost of each path, so it can optimize queries
      with LIMIT on a reasonable basis by interpolating between these costs.
      Same facility is a win for EXISTS(...) subqueries and some other cases.
      
      Redesign pathkey representation to achieve a major speedup in planning
      (I saw as much as 5X on a 10-way join); also minor changes in planner
      to reduce memory consumption by recycling discarded Path nodes and
      not constructing unnecessary lists.
      
      Minor cleanups to display more-plausible costs in some cases in
      EXPLAIN output.
      
      Initdb forced by change in interface to index cost estimation
      functions.
      b1577a7c
  26. 11 2月, 2000 1 次提交
  27. 31 1月, 2000 1 次提交
  28. 26 1月, 2000 2 次提交
    • B
      Add: · 5c25d602
      Bruce Momjian 提交于
        * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
      
      to all files copyright Regents of Berkeley.  Man, that's a lot of files.
      5c25d602
    • B
      as attache of this mail is patch (to the main tree) with to_char's · b866d2e2
      Bruce Momjian 提交于
      family functions. Contain:
      
        conversion from a datetype to formatted text:
      
      	to_char( datetime, 	text)
      	to_char( timestamp,	text)
      	to_char( int4,		text)
      	to_char( int8,		text)
      	to_char( float4,	text)
      	to_char( float8,	text)
      	to_char( numeric,	text)
      
        vice versa:
      
      	to_date		( text, text)
      	to_datetime	( text, text)
      	to_timestamp	( text, text)
      	to_number	( text, text)	   (convert to numeric)
      
      
        PostgreSQL to_char is very compatible with Oracle's to_char(), but not
      total exactly (now). Small differentions are in number formating. It will
      fix in next to_char() version.
      
      
      ! If will this patch aplly to the main tree, must be delete the current
        to_char version in contrib (directory "dateformat" and note in contrib's
        README), this patch not erase it (sorry Bruce).
      
      
      
      The patch patching files:
      
      	doc/src/sgml/func.sgml
                           ^^^^^^^^
         Hmm, I'm not sure if my English... :( Check it anyone (volunteer)?
      
         Thomas, it is right? SGML is not my primary lang  and compile
         the current PG docs tree is very happy job (hard variables setting in
         docs/sgml/Makefile --> HSTYLE= /home/users/t/thomas/....  :-)
      
         What add any definition to global configure.in and set Makefiles in docs
         tree via ./configure?
      
      	src/backend/utils/adt/Makefile
      	src/backend/utils/adt/formatting.c
      	src/include/catalog/pg_proc.h
      	src/include/utils/formatting.h
      Karel Zak <zakkr@zf.jcu.cz>              http://home.zf.jcu.cz/~zakkr/
      b866d2e2
  29. 24 1月, 2000 1 次提交
    • T
      First cut at making useful selectivity estimates for range queries · 0dbffa70
      Tom Lane 提交于
      (ie, WHERE x > lowbound AND x < highbound).  It's not very bright yet
      but it does something useful.  Also, rename intltsel/intgtsel to
      scalarltsel/scalargtsel to reflect usage better.  Extend convert_to_scalar
      to do something a little bit useful with string data types.  Still need
      to make it do something with date/time datatypes, but I'll wait for
      Thomas's datetime unification dust to settle first.  Eventually the
      routine ought not have any type-specific knowledge at all; it ought to
      be calling a type-dependent routine found via a pg_type column; but
      that's a task for another day.
      0dbffa70
  30. 23 1月, 2000 1 次提交
  31. 18 1月, 2000 1 次提交
  32. 17 1月, 2000 1 次提交
  33. 11 1月, 2000 1 次提交
  34. 07 1月, 2000 1 次提交