1. 18 Jul, 2002 1 commit
    • Tatsuo Ishii's avatar
      I have committed many support files for CREATE CONVERSION. Default · eb335a03
      Tatsuo Ishii authored
      conversion procs and conversions are added in initdb. Currently
      supported conversions are:
      
      UTF-8(UNICODE) <--> SQL_ASCII, ISO-8859-1 to 16, EUC_JP, EUC_KR,
      		    EUC_CN, EUC_TW, SJIS, BIG5, GBK, GB18030, UHC,
      		    JOHAB, TCVN
      
      EUC_JP <--> SJIS
      EUC_TW <--> BIG5
      MULE_INTERNAL <--> EUC_JP, SJIS, EUC_TW, BIG5
      
      Note that initial contents of pg_conversion system catalog are created
      in the initdb process. So doing initdb required is ideal, it's
      possible to add them to your databases by hand, however. To accomplish
      this:
      
      psql -f your_postgresql_install_path/share/conversion_create.sql your_database
      
      So I did not bump up the version in cataversion.h.
      
      TODO:
      Add more conversion procs
      Add [CASCADE|RESTRICT] to DROP CONVERSION
      Add tuples to pg_depend
      Add regression tests
      Write docs
      Add SQL99 CONVERT command?
      --
      Tatsuo Ishii
      eb335a03
  2. 16 Jul, 2002 1 commit
  3. 14 Jul, 2002 1 commit
  4. 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
  5. 11 Jul, 2002 1 commit
    • Tatsuo Ishii's avatar
      Add new CREATE CONVERSION/DROP CONVERSION command. · fcc96256
      Tatsuo Ishii authored
      This is the first cut toward CREATE CONVERSION/DROP CONVERSION implementaion.
      The commands can now add/remove tuples to the new pg_conversion system
      catalog, but that's all. Still need work to make them actually working.
      Documentations, regression tests also need work.
      fcc96256
  6. 06 Jul, 2002 1 commit
  7. 04 Jul, 2002 1 commit
    • Thomas G. Lockhart's avatar
      Implement the IS DISTINCT FROM operator per SQL99. · 68d9fbeb
      Thomas G. Lockhart authored
      Reused the Expr node to hold DISTINCT which strongly resembles
       the existing OP info. Define DISTINCT_EXPR which strongly resembles
       the existing OPER_EXPR opType, but with handling for NULLs required
       by SQL99.
      We have explicit support for single-element DISTINCT comparisons
       all the way through to the executor. But, multi-element DISTINCTs
       are handled by expanding into a comparison tree in gram.y as is done for
       other row comparisons. Per discussions, it might be desirable to move
       this into one or more purpose-built nodes to be handled in the backend.
      Define the optional ROW keyword and token per SQL99.
       This allows single-element row constructs, which were formerly disallowed
       due to shift/reduce conflicts with parenthesized a_expr clauses.
      Define the SQL99 TREAT() function. Currently, use as a synonym for CAST().
      68d9fbeb
  8. 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
  9. 22 Jun, 2002 1 commit
    • Thomas G. Lockhart's avatar
      Implement SQL99 CREATE CAST and DROP CAST statements. · 90edb265
      Thomas G. Lockhart authored
       Also implement alternative forms to expose the PostgreSQL CREATE FUNCTION
       features.
      Implement syntax for READ ONLY and READ WRITE clauses in SET TRANSACTION.
       READ WRITE is already implemented (of course).
      Implement syntax for "LIKE table" clause in CREATE TABLE. Should be fairly
       easy to complete since it resembles SELECT INTO.
      Implement MATCH SIMPLE clause for foreign key definitions. This is explicit
       SQL99 syntax for the default behavior, so we now support it :)
      Start implementation of shorthand for national character literals in
       scanner. For now, just swallow the leading "N", but sometime soon let's
       figure out how to pass leading type info from the scanner to the parser.
       We should use the same technique for binary and hex bit string literals,
       though it might be unusual to have two apparently independent literal
       types fold into the same storage type.
      90edb265
  10. 20 Jun, 2002 2 commits
  11. 19 Jun, 2002 1 commit
  12. 18 Jun, 2002 3 commits
  13. 17 Jun, 2002 4 commits
  14. 15 Jun, 2002 1 commit
    • Thomas G. Lockhart's avatar
      Add LOCALTIME and LOCALTIMESTAMP functions per SQL99 standard. · 133df7ce
      Thomas G. Lockhart authored
      Remove ODBC-compatible empty parentheses from calls to SQL99 functions
       for which these parentheses do not match the standard.
      Update the ODBC driver to ensure compatibility with the ODBC standard
       for these functions (e.g. CURRENT_TIMESTAMP, CURRENT_USER, etc).
      Include a new appendix in the User's Guide which lists the labeled features
       for SQL99 (the labeled features replaced the "basic", "intermediate",
       and "advanced" categories from SQL92). features.sgml does not yet split
       this list into "supported" and "unsupported" lists.
      133df7ce
  15. 13 Jun, 2002 1 commit
  16. 11 Jun, 2002 2 commits
    • Thomas G. Lockhart's avatar
      Implement SQL99 OVERLAY(). Allows substitution of a substring in a string. · ea01a451
      Thomas G. Lockhart authored
      Implement SQL99 SIMILAR TO as a synonym for our existing operator "~".
      Implement SQL99 regular expression SUBSTRING(string FROM pat FOR escape).
       Extend the definition to make the FOR clause optional.
       Define textregexsubstr() to actually implement this feature.
      Update the regression test to include these new string features.
       All tests pass.
      Rename the regular expression support routines from "pg95_xxx" to "pg_xxx".
      Define CREATE CHARACTER SET in the parser per SQL99. No implementation yet.
      ea01a451
    • Jan Wieck's avatar
      Katherine Ward wrote: · 469cb65a
      Jan Wieck authored
      > Changes to avoid collisions with WIN32 & MFC names...
      > 1.  Renamed:
      >       a.  PROC => PGPROC
      >       b.  GetUserName() => GetUserNameFromId()
      >       c.  GetCurrentTime() => GetCurrentDateTime()
      >       d.  IGNORE => IGNORE_DTF in include/utils/datetime.h & utils/adt/datetim
      >
      > 2.  Added _P to some lex/yacc tokens:
      >       CONST, CHAR, DELETE, FLOAT, GROUP, IN, OUT
      
      Jan
      469cb65a
  17. 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
  18. 19 May, 2002 1 commit
  19. 17 May, 2002 2 commits
  20. 13 May, 2002 1 commit
    • Tom Lane's avatar
      Make operators have their own comments separate from those of the · f69bc37b
      Tom Lane authored
      underlying function; but cause psql's \do to show the underlying
      function's comment if the operator has no comment of its own, to preserve
      the useful functionality of the original behavior.  Also, implement
      COMMENT ON SCHEMA.  Patch from Rod Taylor.
      f69bc37b
  21. 12 May, 2002 1 commit
  22. 06 May, 2002 1 commit
    • Tom Lane's avatar
      Accept SET SESSION AUTHORIZATION DEFAULT and RESET SESSION AUTHORIZATION · 28227889
      Tom Lane authored
      to reset session userid to the originally-authenticated name.  Also,
      relax SET SESSION AUTHORIZATION to allow specifying one's own username
      even if one is not superuser, so as to avoid unnecessary error messages
      when loading a pg_dump file that uses this command.  Per discussion from
      several months ago.
      28227889
  23. 03 May, 2002 1 commit
    • Tom Lane's avatar
      Retire xlateSqlType/xlateSqlFunc; all type name translations are now · 53cedcac
      Tom Lane authored
      handled as special productions.  This is needed to keep us honest about
      user-schema type names that happen to coincide with system type names.
      Per pghackers discussion 24-Apr.  To avoid bloating the keyword list
      too much, I removed the translations for datetime, timespan, and lztext,
      all of which were slated for destruction several versions back anyway.
      53cedcac
  24. 02 May, 2002 1 commit
  25. 24 Apr, 2002 1 commit
  26. 21 Apr, 2002 4 commits
    • Thomas G. Lockhart's avatar
    • Thomas G. Lockhart's avatar
      Remove the definition for set_name_needs_quotes() on the assumption that · d19439f7
      Thomas G. Lockhart authored
       it is now obsolete. Need some regression test cases to prove otherwise...
      d19439f7
    • Thomas G. Lockhart's avatar
      Make WITHOUT TIME ZONE the default for TIMESTAMP and TIME data types. · 37cfb040
      Thomas G. Lockhart authored
       This is a big change from past behavior, but the last release was
       designed to handle this correctly for dump/restore upgrades.
      Fix up handling of SET value arguments. Allow lists for most options at
       least at the parser level; multiple values may be rejected at the
       command processor of course.
      Allow more variations on values for SET commands, including integer and
       float values where formerly stringy fields were required.
      Check precision specification for date/time fields against the true
       precision range allowed by the data types. Especially useful with the
       new int8-based storage for these types, where precision is fixed and
       predictable.
      Stub out a basic CREATE ASSERTION per SQL9x. Does not do anything (yet) but
       should be augmented as appropriate.
      Minor fixups in braces and tabbing.
      37cfb040
    • 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
  27. 18 Apr, 2002 2 commits
  28. 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