1. 16 Apr, 2002 1 commit
    • Tom Lane's avatar
      Operators live in namespaces. CREATE/DROP/COMMENT ON OPERATOR take · 6cef5d25
      Tom Lane authored
      qualified operator names directly, for example CREATE OPERATOR myschema.+
      ( ... ).  To qualify an operator name in an expression you need to write
      OPERATOR(myschema.+) (thanks to Peter for suggesting an escape hatch).
      I also took advantage of having to reformat pg_operator to fix something
      that'd been bugging me for a while: mergejoinable operators should have
      explicit links to the associated cross-data-type comparison operators,
      rather than hardwiring an assumption that they are named < and >.
      6cef5d25
  2. 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
  3. 09 Apr, 2002 1 commit
  4. 05 Apr, 2002 1 commit
  5. 29 Mar, 2002 1 commit
  6. 22 Mar, 2002 1 commit
    • Tom Lane's avatar
      A little further progress on schemas: push down RangeVars into · 108a0ec8
      Tom Lane authored
      addRangeTableEntry calls.  Remove relname field from RTEs, since
      it will no longer be a useful unique identifier of relations;
      we want to encourage people to rely on the relation OID instead.
      Further work on dumping qual expressions in EXPLAIN, too.
      108a0ec8
  7. 21 Mar, 2002 1 commit
    • Tom Lane's avatar
      First phase of SCHEMA changes, concentrating on fixing the grammar and · 95ef6a34
      Tom Lane authored
      the parsetree representation.  As yet we don't *do* anything with schema
      names, just drop 'em on the floor; but you can enter schema-compatible
      command syntax, and there's even a primitive CREATE SCHEMA command.
      No doc updates yet, except to note that you can now extract a field
      from a function-returning-row's result with (foo(...)).fieldname.
      95ef6a34
  8. 20 Mar, 2002 1 commit
  9. 19 Mar, 2002 1 commit
  10. 12 Mar, 2002 1 commit
    • Tom Lane's avatar
      Restructure representation of join alias variables. An explicit JOIN · 6eeb95f0
      Tom Lane authored
      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
  11. 08 Mar, 2002 1 commit
  12. 07 Mar, 2002 1 commit
  13. 06 Mar, 2002 2 commits
    • Bruce Momjian's avatar
      Ok. Updated patch attached. · 01c76f74
      Bruce Momjian authored
      - 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
    • Bruce Momjian's avatar
      Change made to elog: · 92288a1c
      Bruce Momjian authored
      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
  14. 01 Mar, 2002 1 commit
  15. 26 Feb, 2002 1 commit
    • Tom Lane's avatar
      Restructure command-completion-report code so that there is just one · 56ee2ecb
      Tom Lane authored
      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
  16. 24 Feb, 2002 1 commit
  17. 18 Feb, 2002 1 commit
  18. 05 Nov, 2001 1 commit
    • Tom Lane's avatar
      CREATE TABLE foo (x,y,z) AS SELECT ... can't apply target column names · 5251e7b3
      Tom Lane authored
      to the target list in gram.y; it must wait till after expansion of the
      target list in analyze.c.  Per bug report 4-Nov:
      lx=# CREATE TABLE abc (a char, b char, c char);
      CREATE
      lx=# CREATE TABLE xyz (x, y, z) AS SELECT * FROM abc;
      ERROR:  CREATE TABLE/AS SELECT has mismatched column count
      5251e7b3
  19. 25 Oct, 2001 1 commit
  20. 18 Oct, 2001 1 commit
    • Thomas G. Lockhart's avatar
      Accept an INTERVAL argument for SET TIME ZONE per SQL99. · 9310075a
      Thomas G. Lockhart authored
       Modified the parser and the SET handlers to use full Node structures
       rather than simply a character string argument.
      Implement INTERVAL() YEAR TO MONTH (etc) syntax per SQL99.
       Does not yet accept the goofy string format that goes along with, but
       this should be fairly straight forward to fix now as a bug or later
       as a feature.
      Implement precision for the INTERVAL() type.
       Use the typmod mechanism for both of INTERVAL features.
      Fix the INTERVAL syntax in the parser:
       opt_interval was in the wrong place.
      INTERVAL is now a reserved word, otherwise we get reduce/reduce errors.
      Implement an explicit date_part() function for TIMETZ.
       Should fix coersion problem with INTERVAL reported by Peter E.
      Fix up some error messages for date/time types.
       Use all caps for type names within message.
      Fix recently introduced side-effect bug disabling 'epoch' as a recognized
       field for date_part() etc. Reported by Peter E. (??)
      Bump catalog version number.
      Rename "microseconds" current transaction time field
       from ...Msec to ...Usec. Duh!
      date/time regression tests updated for reference platform, but a few
       changes will be necessary for others.
      9310075a
  21. 02 Oct, 2001 1 commit
  22. 18 Sep, 2001 1 commit
  23. 26 Aug, 2001 1 commit
  24. 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
  25. 16 Aug, 2001 1 commit
    • Tom Lane's avatar
      Sequences are now based on int8, not int4, arithmetic. SERIAL pseudo-type · d4f4b971
      Tom Lane authored
      has an alias SERIAL4 and a sister SERIAL8.  SERIAL8 is just the same
      except the created column is type int8 not int4.
      initdb forced.  Note this also breaks any chance of pg_upgrade from 7.1,
      unless we hack up pg_upgrade to drop and recreate sequences.  (Which is
      not out of the question, but I don't wanna do it.)
      d4f4b971
  26. 10 Aug, 2001 2 commits
  27. 04 Aug, 2001 2 commits
  28. 16 Jul, 2001 1 commit
  29. 12 Jul, 2001 1 commit
  30. 10 Jul, 2001 1 commit
    • Tom Lane's avatar
      Changes from Vince Vielhaber to allow the optional clauses of CREATE · 320b6db0
      Tom Lane authored
      USER and ALTER USER to appear in any order, not only the fixed order
      they used to be required to appear in.
      Also, some changes from Tom Lane to create a FULL option for VACUUM;
      it doesn't do anything yet, but I needed to change many of the same
      files to make that happen, so now seemed like a good time.
      320b6db0
  31. 19 Jun, 2001 1 commit
  32. 09 Jun, 2001 1 commit
  33. 05 Jun, 2001 1 commit
    • Tom Lane's avatar
      Further work on making use of new statistics in planner. Adjust APIs · 7c579fa1
      Tom Lane authored
      of costsize.c routines to pass Query root, so that costsize can figure
      more things out by itself and not be so dependent on its callers to tell
      it everything it needs to know.  Use selectivity of hash or merge clause
      to estimate number of tuples processed internally in these joins
      (this is more useful than it would've been before, since eqjoinsel is
      somewhat more accurate than before).
      7c579fa1
  34. 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
  35. 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
  36. 22 Mar, 2001 1 commit
  37. 24 Jan, 2001 1 commit