1. 19 Jul, 2003 1 commit
  2. 26 May, 2003 1 commit
    • Tom Lane's avatar
      Cause CHAR(n) to TEXT or VARCHAR conversion to automatically strip trailing · f45df8c0
      Tom Lane authored
      blanks, in hopes of reducing the surprise factor for newbies.  Remove
      redundant operators for VARCHAR (it depends wholly on TEXT operations now).
      Clean up resolution of ambiguous operators/functions to avoid surprising
      choices for domains: domains are treated as equivalent to their base types
      and binary-coercibility is no longer considered a preference item when
      choosing among multiple operators/functions.  IsBinaryCoercible now correctly
      reflects the notion that you need *only* relabel the type to get from type
      A to type B: that is, a domain is binary-coercible to its base type, but
      not vice versa.  Various marginal cleanup, including merging the essentially
      duplicate resolution code in parse_func.c and parse_oper.c.  Improve opr_sanity
      regression test to understand about binary compatibility (using pg_cast),
      and fix a couple of small errors in the catalogs revealed thereby.
      Restructure "special operator" handling to fetch operators via index opclasses
      rather than hardwiring assumptions about names (cleans up the pattern_ops
      stuff a little).
      f45df8c0
  3. 23 Mar, 2003 1 commit
    • Tom Lane's avatar
      Instead of storing pg_statistic stavalues entries as text strings, store · 8d9e025e
      Tom Lane authored
      them as arrays of the internal datatype.  This requires treating the
      stavalues columns as 'anyarray' rather than 'text[]', which is not 100%
      kosher but seems to work fine for the purposes we need for pg_statistic.
      Perhaps in the future 'anyarray' will be allowed more generally.
      8d9e025e
  4. 20 Mar, 2003 1 commit
  5. 19 Feb, 2003 2 commits
    • Bruce Momjian's avatar
    • Bruce Momjian's avatar
      - Modifies LOCKTAG to include a 'classId'. Relation receive a classId of · d0f3a7e9
      Bruce Momjian authored
      RelOid_pg_class, and transaction locks XactLockTableId. RelId is renamed
      to objId.
      
      - LockObject() and UnlockObject() functions created, and their use
      sprinkled throughout the code to do descent locking for domains and
      types. They accept lock modes AccessShare and AccessExclusive, as we
      only really need a 'read' and 'write' lock at the moment.  Most locking
      cases are held until the end of the transaction.
      
      This fixes the cases Tom mentioned earlier in regards to locking with
      Domains.  If the patch is good, I'll work on cleaning up issues with
      other database objects that have this problem (most of them).
      
      Rod Taylor
      d0f3a7e9
  6. 14 Dec, 2002 1 commit
  7. 04 Dec, 2002 1 commit
  8. 21 Nov, 2002 2 commits
  9. 19 Oct, 2002 1 commit
    • Tom Lane's avatar
      Fix rewrite code so that rules are in fact executed in order by name, · c1f91a38
      Tom Lane authored
      rather than being reordered according to INSTEAD attribute for
      implementation convenience.
      Also, increase compiled-in recursion depth limit from 10 to 100 rewrite
      cycles.  10 seems pretty marginal for situations where multiple rules
      exist for the same query.  There was a complaint about this recently,
      so I'm going to bump it up.  (Perhaps we should make the limit a GUC
      parameter, but that's too close to being a new feature to do in beta.)
      c1f91a38
  10. 19 Sep, 2002 1 commit
    • Tom Lane's avatar
      Department of second thoughts: suppressing implicit casts everywhere in · 4a0c3a61
      Tom Lane authored
      ruleutils display is not such a great idea.  For arguments of functions
      and operators I think we'd better keep the historical behavior of showing
      such casts explicitly, to ensure that the function/operator is reparsed
      the same way when the rule is reloaded.  This also makes the output of
      EXPLAIN less obscurantist about exactly what's happening.
      4a0c3a61
  11. 18 Sep, 2002 1 commit
    • Tom Lane's avatar
      Extend pg_cast castimplicit column to a three-way value; this allows us · b26dfb95
      Tom Lane authored
      to be flexible about assignment casts without introducing ambiguity in
      operator/function resolution.  Introduce a well-defined promotion hierarchy
      for numeric datatypes (int2->int4->int8->numeric->float4->float8).
      Change make_const to initially label numeric literals as int4, int8, or
      numeric (never float8 anymore).
      Explicitly mark Func and RelabelType nodes to indicate whether they came
      from a function call, explicit cast, or implicit cast; use this to do
      reverse-listing more accurately and without so many heuristics.
      Explicit casts to char, varchar, bit, varbit will truncate or pad without
      raising an error (the pre-7.2 behavior), while assigning to a column without
      any explicit cast will still raise an error for wrong-length data like 7.3.
      This more nearly follows the SQL spec than 7.2 behavior (we should be
      reporting a 'completion condition' in the explicit-cast cases, but we have
      no mechanism for that, so just do silent truncation).
      Fix some problems with enforcement of typmod for array elements;
      it didn't work at all in 'UPDATE ... SET array[n] = foo', for example.
      Provide a generalized array_length_coerce() function to replace the
      specialized per-array-type functions that used to be needed (and were
      missing for NUMERIC as well as all the datetime types).
      Add missing conversions int8<->float4, text<->numeric, oid<->int8.
      initdb forced.
      b26dfb95
  12. 02 Sep, 2002 2 commits
  13. 31 Aug, 2002 1 commit
    • Tom Lane's avatar
      Code review for pg_locks feature. Make shmemoffset of PROCLOCK structs · 1bab464e
      Tom Lane authored
      available (else there's no way to interpret the list links).  Change
      pg_locks view to show transaction ID locks separately from ordinary
      relation locks.  Avoid showing N duplicate rows when the same lock is
      held multiple times (seems unlikely that users care about exact hold
      count).  Improve documentation.
      1bab464e
  14. 29 Aug, 2002 1 commit
  15. 27 Aug, 2002 1 commit
  16. 18 Aug, 2002 1 commit
    • Peter Eisentraut's avatar
      Make pg_dump output more portable and more pleasing to look at. · c828ec88
      Peter Eisentraut authored
      The -n and -N options were removed.  Quoting is now smart enough to
      supply quotes if and only if necessary.
      
      Numerical types are now printed without quotes, except in cases of
      special values such as NaN.
      
      Boolean values printed as true and false.
      
      Most string literals now do not escape whitespace characters (newlines,
      etc.) for portability.
      
      SET SESSION AUTHORIZATION argument is a string literal, to follow SQL.
      
      Made commands output by pg_dump use consistent spacing and indentation.
      c828ec88
  17. 17 Aug, 2002 1 commit
    • Bruce Momjian's avatar
      [ Newest version of patch applied.] · 82119a69
      Bruce Momjian authored
      This patch is an updated version of the lock listing patch. I've made
      the following changes:
      
          - write documentation
          - wrap the SRF in a view called 'pg_locks': all user-level
            access should be done through this view
          - re-diff against latest CVS
      
      One thing I chose not to do is adapt the SRF to use the anonymous
      composite type code from Joe Conway. I'll probably do that eventually,
      but I'm not really convinced it's a significantly cleaner way to
      bootstrap SRF builtins than the method this patch uses (of course, it
      has other uses...)
      
      Neil Conway
      82119a69
  18. 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
  19. 08 Aug, 2002 1 commit
  20. 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
  21. 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
  22. 28 Apr, 2002 1 commit
  23. 19 Apr, 2002 1 commit
  24. 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
  25. 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
  26. 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
  27. 01 Mar, 2002 1 commit
  28. 16 Oct, 2001 1 commit
  29. 29 Sep, 2001 1 commit
  30. 28 Sep, 2001 1 commit
  31. 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
  32. 14 Aug, 2001 1 commit
    • Tom Lane's avatar
      sum() on int2 and int4 columns now uses an int8, not numeric, accumulator · 5f7c2bdb
      Tom Lane authored
      for speed reasons; its result type also changes to int8.  avg() on these
      datatypes now accumulates the running sum in int8 for speed; but we still
      deliver the final result as numeric, so that fractional accuracy is
      preserved.
      
      count() now counts and returns in int8, not int4.  I am a little nervous
      about this possibly breaking users' code, but there didn't seem to be
      a strong sentiment for avoiding the problem.  If we get complaints during
      beta, we can change count back to int4 and add a "count8" aggregate.
      For that matter, users can do it for themselves with a simple CREATE
      AGGREGATE command; the int4inc function is still present, so no C hacking
      is needed.
      
      Also added max() and min() aggregates for OID that do proper unsigned
      comparison, instead of piggybacking on int4 aggregates.
      
      initdb forced.
      5f7c2bdb
  33. 10 Aug, 2001 1 commit
    • Tom Lane's avatar
      Make OIDs optional, per discussions in pghackers. WITH OIDS is still the · bf56f075
      Tom Lane authored
      default, but OIDS are removed from many system catalogs that don't need them.
      Some interesting side effects: TOAST pointers are 20 bytes not 32 now;
      pg_description has a three-column key instead of one.
      
      Bugs fixed in passing: BINARY cursors work again; pg_class.relhaspkey
      has some usefulness; pg_dump dumps comments on indexes, rules, and
      triggers in a valid order.
      
      initdb forced.
      bf56f075
  34. 09 Jul, 2001 1 commit
  35. 22 Jun, 2001 1 commit
  36. 14 Jun, 2001 1 commit
  37. 05 Dec, 2000 1 commit