1. 16 Aug, 2002 1 commit
  2. 15 Aug, 2002 1 commit
    • Bruce Momjian's avatar
      As discussed on several occasions previously, the new anonymous · 45e25445
      Bruce Momjian authored
      composite type capability makes it possible to create a system view
      based on a table function in a way that is hopefully palatable to
      everyone. The attached patch takes advantage of this, moving
      show_all_settings() from contrib/tablefunc into the backend (renamed
      all_settings(). It is defined as a builtin returning type RECORD. During
      initdb a system view is created to expose the same information presently
      available through SHOW ALL. For example:
      
      test=# select * from pg_settings where name like '%debug%';
                name          | setting
      -----------------------+---------
        debug_assertions      | on
        debug_pretty_print    | off
        debug_print_parse     | off
        debug_print_plan      | off
        debug_print_query     | off
        debug_print_rewritten | off
        wal_debug             | 0
      (7 rows)
      
      
      Additionally during initdb two rules are created which make it possible
      to change settings by updating the system view -- a "virtual table" as
      Tom put it. Here's an example:
      
      Joe Conway
      45e25445
  3. 09 Aug, 2002 1 commit
    • Tom Lane's avatar
      has_table_privilege spawns scions has_database_privilege, has_function_privilege, · 4ab8e690
      Tom Lane authored
      has_language_privilege, has_schema_privilege to let SQL queries test
      all the new privilege types in 7.3.  Also, add functions pg_table_is_visible,
      pg_type_is_visible, pg_function_is_visible, pg_operator_is_visible,
      pg_opclass_is_visible to test whether objects contained in schemas are
      visible in the current search path.  Do some minor cleanup to centralize
      accesses to pg_database, as well.
      4ab8e690
  4. 06 Aug, 2002 1 commit
  5. 04 Aug, 2002 3 commits
  6. 31 Jul, 2002 2 commits
  7. 24 Jul, 2002 1 commit
    • Peter Eisentraut's avatar
      Remove unused system table columns: · 739adf32
      Peter Eisentraut authored
      pg_language.lancompiler
      pg_operator.oprprec
      pg_operator.oprisleft
      pg_proc.proimplicit
      pg_proc.probyte_pct
      pg_proc.properbyte_cpu
      pg_proc.propercall_cpu
      pg_proc.prooutin_ratio
      pg_shadow.usetrace
      pg_type.typprtlen
      pg_type.typreceive
      pg_type.typsend
      
      Attempts to use the obsoleted attributes of pg_operator or pg_proc
      in the CREATE commands will be greeted by a warning.  For pg_type,
      there is no warning (yet) because pg_dump scripts still contain these
      attributes.
      
      Also remove new but already obsolete spellings
      isVolatile, isStable, isImmutable in WITH clause.  (Use new syntax
      instead.)
      739adf32
  8. 20 Jul, 2002 1 commit
  9. 18 Jul, 2002 1 commit
    • Peter Eisentraut's avatar
      pg_cast table, and standards-compliant CREATE/DROP CAST commands, plus · 97377048
      Peter Eisentraut authored
      extension to create binary compatible casts.  Includes dependency tracking
      as well.
      
      pg_proc.proimplicit is now defunct, but will be removed in a separate
      commit.
      
      pg_dump provides a migration path from the previous scheme to declare
      casts.  Dumping binary compatible casts is currently impossible, though.
      97377048
  10. 20 Jun, 2002 1 commit
  11. 15 Jun, 2002 1 commit
  12. 11 Jun, 2002 1 commit
    • 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
  13. 24 May, 2002 1 commit
    • Tom Lane's avatar
      Mark index entries "killed" when they are no longer visible to any · 3f4d4880
      Tom Lane authored
      transaction, so as to avoid returning them out of the index AM.  Saves
      repeated heap_fetch operations on frequently-updated rows.  Also detect
      queries on unique keys (equality to all columns of a unique index), and
      don't bother continuing scan once we have found first match.
      
      Killing is implemented in the btree and hash AMs, but not yet in rtree
      or gist, because there isn't an equally convenient place to do it in
      those AMs (the outer amgetnext routine can't do it without re-pinning
      the index page).
      
      Did some small cleanup on APIs of HeapTupleSatisfies, heap_fetch, and
      index_insert to make this a little easier.
      3f4d4880
  14. 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
  15. 20 May, 2002 1 commit
    • Tom Lane's avatar
      Restructure indexscan API (index_beginscan, index_getnext) per · 44fbe20d
      Tom Lane authored
      yesterday's proposal to pghackers.  Also remove unnecessary parameters
      to heap_beginscan, heap_rescan.  I modified pg_proc.h to reflect the
      new numbers of parameters for the AM interface routines, but did not
      force an initdb because nothing actually looks at those fields.
      44fbe20d
  16. 18 May, 2002 1 commit
  17. 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
  18. 30 Apr, 2002 1 commit
  19. 26 Apr, 2002 1 commit
  20. 25 Apr, 2002 1 commit
  21. 24 Apr, 2002 3 commits
  22. 21 Apr, 2002 1 commit
    • Thomas G. Lockhart's avatar
      Support alternate storage scheme of 64-bit integer for date/time types. · 547df0cc
      Thomas G. Lockhart authored
       Use "--enable-integer-datetimes" in configuration to use this rather
       than the original float8 storage. I would recommend the integer-based
       storage for any platform on which it is available. We perhaps should
       make this the default for the production release.
      Change timezone(timestamptz) results to return timestamp rather than
       a character string. Formerly, we didn't have a way to represent
       timestamps with an explicit time zone other than freezing the info into
       a string. Now, we can reasonably omit the explicit time zone from the
       result and return a timestamp with values appropriate for the specified
       time zone. Much cleaner, and if you need the time zone in the result
       you can put it into a character string pretty easily anyway.
      Allow fractional seconds in date/time types even for dates prior to 1BC.
      Limit timestamp data types to 6 decimal places of precision. Just right
       for a micro-second storage of int8 date/time types, and reduces the
       number of places ad-hoc rounding was occuring for the float8-based types.
      Use lookup tables for precision/rounding calculations for timestamp and
       interval types.  Formerly used pow() to calculate the desired value but
       with a more limited range there is no reason to not type in a lookup
       table. Should be *much* better performance, though formerly there were
       some optimizations to help minimize the number of times pow() was called.
      Define a HAVE_INT64_TIMESTAMP variable. Based on the configure option
       "--enable-integer-datetimes" and the existing internal INT64_IS_BUSTED.
      Add explicit date/interval operators and functions for addition and
       subtraction. Formerly relied on implicit type promotion from date to
       timestamp with time zone.
      Change timezone conversion functions for the timetz type from "timetz()"
       to "timezone()". This is consistant with other time zone coersion
       functions for other types.
      Bump the catalog version to 200204201.
      Fix up regression tests to reflect changes in fractional seconds
       representation for date/times in BC eras.
      All regression tests pass on my Linux box.
      547df0cc
  23. 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
  24. 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
  25. 05 Apr, 2002 1 commit
  26. 04 Apr, 2002 1 commit
    • Bruce Momjian's avatar
      Authentication improvements: · 43a3543a
      Bruce Momjian authored
      A new pg_hba.conf column, USER
      Allow specifiction of lists of users separated by commas
      Allow group names specified by +
      Allow include files containing lists of users specified by @
      Allow lists of databases, and database files
      Allow samegroup in database column to match group name matching dbname
      Removal of secondary password files
      Remove pg_passwd utility
      Lots of code cleanup in user.c and hba.c
      New data/global/pg_pwd format
      New data/global/pg_group file
      43a3543a
  27. 29 Mar, 2002 1 commit
  28. 18 Feb, 2002 1 commit
  29. 12 Jan, 2002 1 commit
    • Thomas G. Lockhart's avatar
      Repair bugs in declarations of routines to add timestamptz and interval. · 192061e4
      Thomas G. Lockhart authored
       Thanks to Bruce for spotting it and Tom Lane for diagnosing it.
      Since horology test output is changing anyway, add some date/time input
       tests to horology.sql. Some of these should move to the tests for the
       individual data types, and we perhaps should add an entire new test
       for "timezone" to allow manipulating the current time zone without
       risking damage to the results of other tests.
      192061e4
  30. 05 Nov, 2001 1 commit
  31. 28 Oct, 2001 1 commit
  32. 25 Oct, 2001 2 commits
  33. 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
  34. 12 Oct, 2001 1 commit