1. 12 Jul, 2002 1 commit
    • Tom Lane's avatar
      Second phase of committing Rod Taylor's pg_depend/pg_constraint patch. · 7c6df91d
      Tom Lane authored
      pg_relcheck is gone; CHECK, UNIQUE, PRIMARY KEY, and FOREIGN KEY
      constraints all have real live entries in pg_constraint.  pg_depend
      exists, and RESTRICT/CASCADE options work on most kinds of DROP;
      however, pg_depend is not yet very well populated with dependencies.
      (Most of the ones that are present at this point just replace formerly
      hardwired associations, such as the implicit drop of a relation's pg_type
      entry when the relation is dropped.)  Need to add more logic to create
      dependency entries, improve pg_dump to dump constraints in place of
      indexes and triggers, and add some regression tests.
      7c6df91d
  2. 20 Jun, 2002 1 commit
  3. 13 Jun, 2002 1 commit
    • Tom Lane's avatar
      Repair for bug #691 --- CREATE TABLE AS column aliases fail to be · 59c325bb
      Tom Lane authored
      applied when the select is a UNION (or other set-operation).
      
      An alternative route to a fix would be to leave analyze.c alone and
      change plan_set_operations in prepunion.c to take column names from
      the topmost targetlist.  But I am not sure that would work in all
      cases.  This patch seems the minimum-risk fix.
      59c325bb
  4. 28 May, 2002 1 commit
  5. 12 May, 2002 1 commit
  6. 28 Apr, 2002 1 commit
    • Tom Lane's avatar
      Second try at fixing join alias variables. Instead of attaching miscellaneous · 6c598869
      Tom Lane authored
      lists to join RTEs, attach a list of Vars and COALESCE expressions that will
      replace the join's alias variables during planning.  This simplifies
      flatten_join_alias_vars while still making it easy to fix up varno references
      when transforming the query tree.  Add regression test cases for interactions
      of subqueries with outer joins.
      6c598869
  7. 24 Apr, 2002 1 commit
    • Bruce Momjian's avatar
      Reports missing values as bad. · dd4ca824
      Bruce Momjian authored
      BAD:  INSERT INTO tab (col1, col2) VALUES ('val1');
      GOOD: INSERT INTO tab (col1, col2) VALUES ('val1', 'val2');
      
      Regress tests against DEFAULT and normal values as they're managed
      slightly different.
      
      Rod Taylor
      dd4ca824
  8. 17 Apr, 2002 1 commit
    • Tom Lane's avatar
      Opclasses live in namespaces. I also took the opportunity to create · 27a54ae2
      Tom Lane authored
      an 'opclass owner' column in pg_opclass.  Nothing is done with it at
      present, but since there are plans to invent a CREATE OPERATOR CLASS
      command soon, we'll probably want DROP OPERATOR CLASS too, which
      suggests that a notion of ownership would be a good idea.
      27a54ae2
  9. 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
  10. 12 Apr, 2002 1 commit
  11. 09 Apr, 2002 1 commit
  12. 05 Apr, 2002 1 commit
  13. 02 Apr, 2002 1 commit
  14. 31 Mar, 2002 1 commit
  15. 29 Mar, 2002 1 commit
  16. 26 Mar, 2002 1 commit
  17. 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
  18. 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
  19. 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
  20. 10 Mar, 2002 1 commit
  21. 08 Mar, 2002 1 commit
  22. 06 Mar, 2002 1 commit
    • 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
  23. 02 Mar, 2002 1 commit
    • Bruce Momjian's avatar
      Commit to match discussed elog() changes. Only update is that LOG is · a033daf5
      Bruce Momjian authored
      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
  24. 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
  25. 25 Feb, 2002 1 commit
    • Bruce Momjian's avatar
      This patch will allow arbitrary levels of analyze / rewriting · b4a09eaa
      Bruce Momjian authored
      by making the static variables extra_before and extra_after
      automatic so we can use recursion.
      
      It gets much easier to generate extra commands now, and one can rest
      assured that the extra commands will be properly analyzed/rewritten.
      
      
      Without this patch, if a command produced by transformation tries to
      use these static lists their first contents would be lost with
      unpredictable results.  I know I could fix this by just using nconc()
      instead of assignments, but the resulting order of the commands would
      not be exactly what one could expect.
      
      --
      Fernando Nasser
      b4a09eaa
  26. 03 Jan, 2002 1 commit
    • Tom Lane's avatar
      Require ownership permission for CREATE INDEX, per bug report. · dc6b4deb
      Tom Lane authored
      Disallow CREATE INDEX on system catalogs, non-tables (views, sequences, etc).
      Disallow CREATE/DROP TRIGGER on system catalogs, non-tables.
      Disallow ALTER TABLE ADD/DROP CONSTRAINT on system catalogs.
      Disallow FOREIGN KEY reference to non-table.
      None of these things can actually work in the present system structure,
      but the code was letting them pass without complaint.
      dc6b4deb
  27. 12 Nov, 2001 1 commit
    • Tom Lane's avatar
      Tweak parser so that there is a defined representation for datatypes · a585c20d
      Tom Lane authored
      bpchar, bit, numeric with typmod -1.  Alter format_type so that this
      representation is printed when the typmod is -1.  This ensures that
      tables having such columns can be pg_dump'd and reloaded correctly.
      Also, remove the rather useless and non-SQL-compliant default
      precision and scale for type NUMERIC.  A numeric column declared as
      such (with no precision/scale) will now have typmod -1 which means
      that numeric values of any precision/scale can be stored in it,
      without conversion to a uniform scale.  This seems significantly
      more useful than the former behavior.  Part of response to bug #513.
      a585c20d
  28. 05 Nov, 2001 2 commits
  29. 04 Nov, 2001 2 commits
  30. 02 Nov, 2001 1 commit
  31. 31 Oct, 2001 1 commit
  32. 28 Oct, 2001 1 commit
  33. 25 Oct, 2001 1 commit
  34. 23 Oct, 2001 1 commit
  35. 22 Oct, 2001 1 commit
  36. 12 Oct, 2001 1 commit
    • Tom Lane's avatar
      Break transformCreateStmt() into multiple routines and make · f9e6e27c
      Tom Lane authored
      transformAlterStmt() use these routines, instead of having lots of
      duplicate (not to mention should-have-been-duplicate) code.
      Adding a column with a CHECK constraint actually works now,
      and the tests to reject unsupported DEFAULT and NOT NULL clauses
      actually fire now.  ALTER TABLE ADD PRIMARY KEY works, modulo
      having to have created the column(s) NOT NULL already.
      f9e6e27c
  37. 03 Oct, 2001 2 commits
    • Tom Lane's avatar
      DROP AGGREGATE and COMMENT ON AGGREGATE now accept the expected syntax · 2e5fda7b
      Tom Lane authored
      'aggname (aggtype)'.  The old syntax 'aggname aggtype' is still accepted
      for backwards compatibility.  Fix pg_dump, which was actually broken for
      most cases of user-defined aggregates.  Clean up error messages associated
      with these commands.
      2e5fda7b
    • Thomas G. Lockhart's avatar
      Implement precision support for timestamp and time, both with and without · 3e1beda2
      Thomas G. Lockhart authored
       time zones.
      SQL99 spec requires a default of zero (round to seconds) which is set
       in gram.y as typmod is set in the parse tree. We *could* change to a
       default of either 6 (for internal compatibility with previous versions)
       or 2 (for external compatibility with previous versions).
      Evaluate entries in pg_proc wrt the iscachable attribute for timestamp and
       other date/time types. Try to recognize cases where side effects like the
       current time zone setting may have an effect on results to decide whether
       something is cachable or not.
      3e1beda2