1. 01 Jul, 2002 1 commit
    • Tom Lane's avatar
      First phase of applying Rod Taylor's pg_depend patch. This just adds · 131f801d
      Tom Lane authored
      RESTRICT/CASCADE syntax to the DROP commands that need it, and propagates
      the behavioral option through the parser to the routines that execute
      drops.  Doesn't do anything useful yet, but I figured I'd commit these
      changes so I could get out of the parser area while working on the rest.
      131f801d
  2. 20 Jun, 2002 2 commits
  3. 18 Jun, 2002 1 commit
  4. 22 May, 2002 1 commit
    • Peter Eisentraut's avatar
      Add optional "validator" function to languages that can validate the · d60f10b0
      Peter Eisentraut authored
      function body (and other properties) as a function in the language
      is created.  This generalizes ad hoc code that already existed for
      the built-in languages.
      
      The validation now happens after the pg_proc tuple of the new function
      is created, so it is possible to define recursive SQL functions.
      
      Add some regression test cases that cover bogus function definition
      attempts.
      d60f10b0
  5. 17 May, 2002 2 commits
  6. 12 May, 2002 1 commit
  7. 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
  8. 24 Apr, 2002 1 commit
  9. 21 Apr, 2002 1 commit
    • Tom Lane's avatar
      Restructure AclItem representation so that we can have more than eight · b0bcf8aa
      Tom Lane authored
      different privilege bits (might as well make use of the space we were
      wasting on padding).  EXECUTE and USAGE bits for procedures, languages
      now are separate privileges instead of being overlaid on SELECT.  Add
      privileges for namespaces and databases.  The GRANT and REVOKE commands
      work for these object types, but we don't actually enforce the privileges
      yet...
      b0bcf8aa
  10. 18 Apr, 2002 1 commit
    • Tom Lane's avatar
      Rule names are now unique per-relation, rather than unique globally. · b3120804
      Tom Lane authored
      DROP RULE and COMMENT ON RULE syntax adds an 'ON tablename' clause,
      similar to TRIGGER syntaxes.  To allow loading of existing pg_dump
      files containing COMMENT ON RULE, the COMMENT code will still accept
      the old syntax --- but only if the target rulename is unique across
      the whole database.
      b3120804
  11. 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
  12. 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
  13. 09 Apr, 2002 1 commit
  14. 05 Apr, 2002 1 commit
  15. 01 Apr, 2002 1 commit
  16. 29 Mar, 2002 1 commit
  17. 26 Mar, 2002 1 commit
  18. 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
  19. 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
  20. 20 Mar, 2002 1 commit
  21. 19 Mar, 2002 1 commit
  22. 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
  23. 08 Mar, 2002 1 commit
  24. 07 Mar, 2002 1 commit
  25. 06 Mar, 2002 1 commit
    • 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
  26. 05 Mar, 2002 1 commit
    • Bruce Momjian's avatar
      I attach a version of my toast-slicing patch, against current CVS · 03194432
      Bruce Momjian authored
      (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
  27. 01 Mar, 2002 1 commit
  28. 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
  29. 24 Feb, 2002 1 commit
  30. 18 Feb, 2002 1 commit
  31. 05 Nov, 2001 2 commits
  32. 28 Oct, 2001 1 commit
  33. 25 Oct, 2001 1 commit
  34. 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
  35. 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
  36. 02 Oct, 2001 1 commit
  37. 18 Sep, 2001 1 commit