1. 01 Feb, 2007 1 commit
  2. 05 Apr, 2006 1 commit
    • Tom Lane's avatar
      Fix a bunch of problems with domains by making them use special input functions · 7fdb4305
      Tom Lane authored
      that apply the necessary domain constraint checks immediately.  This fixes
      cases where domain constraints went unchecked for statement parameters,
      PL function local variables and results, etc.  We can also eliminate existing
      special cases for domains in places that had gotten it right, eg COPY.
      
      Also, allow domains over domains (base of a domain is another domain type).
      This almost worked before, but was disallowed because the original patch
      hadn't gotten it quite right.
      7fdb4305
  3. 15 Jan, 2006 1 commit
  4. 02 Oct, 2005 1 commit
    • Tom Lane's avatar
      Change nextval and other sequence functions to specify their sequence · aa731ed8
      Tom Lane authored
      argument as a 'regclass' value instead of a text string.  The frontend
      conversion of text string to pg_class OID is now encapsulated as an
      implicitly-invocable coercion from text to regclass.  This provides
      backwards compatibility to the old behavior when the sequence argument
      is explicitly typed as 'text'.  When the argument is just an unadorned
      literal string, it will be taken as 'regclass', which means that the
      stored representation will be an OID.  This solves longstanding problems
      with renaming sequences that are referenced in default expressions, as
      well as new-in-8.1 problems with renaming such sequences' schemas or
      moving them to another schema.  All per recent discussion.
      Along the way, fix some rather serious problems in dbmirror's support
      for mirroring sequence operations (int4 vs int8 confusion for instance).
      aa731ed8
  5. 25 Jan, 2005 1 commit
  6. 05 Aug, 2004 1 commit
    • Joe Conway's avatar
      Require that array literals produce "rectangular" arrays, i.e. all the · 0e13d627
      Joe Conway authored
      subarrays of a given dimension have the same number of elements/subarrays.
      
      Also repair a longstanding undocumented (as far as I can see) ability to
      explicitly set array bounds in the array literal syntax. It now can
      deal properly with negative array indicies. Modify array_out so that
      arrays with non-standard lower bounds (i.e. not 1) are output with
      the expicit dimension syntax. This fixes a longstanding issue whereby
      arrays with non-default lower bounds had them changed to default
      after a dump/reload cycle.
      
      Modify regression tests and docs to suit, and add some minimal
      documentation regarding the explicit dimension syntax.
      0e13d627
  7. 15 Sep, 2003 1 commit
  8. 14 May, 2003 1 commit
  9. 03 Feb, 2003 1 commit
  10. 06 Dec, 2002 3 commits
  11. 15 Nov, 2002 1 commit
  12. 19 Oct, 2002 1 commit
  13. 20 Sep, 2002 1 commit
  14. 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
  15. 31 Aug, 2002 1 commit
    • Tom Lane's avatar
      Code review for domain-constraints patch. Use a new ConstraintTest node · 845a6c3a
      Tom Lane authored
      type for runtime constraint checks, instead of misusing the parse-time
      Constraint node for the purpose.  Fix some damage introduced into type
      coercion logic; in particular ensure that a coerced expression tree will
      read out the correct result type when inspected (patch had broken some
      RelabelType cases).  Enforce domain NOT NULL constraints against columns
      that are omitted from an INSERT.
      845a6c3a
  16. 20 Aug, 2002 1 commit
  17. 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
  18. 06 Jul, 2002 1 commit
  19. 20 Mar, 2002 1 commit
  20. 19 Mar, 2002 1 commit