1. 22 Jan, 2000 1 commit
  2. 20 Jan, 2000 1 commit
    • Tom Lane's avatar
      Assign a typmod of -1 to unadorned CHAR and NUMERIC type specs. This · 7476e371
      Tom Lane authored
      allows casts without specific length requirements to continue to work
      as they did before; that is, x::char will not truncate the value of x,
      whereas x::char(1) will.  Likewise for NUMERIC precision/scale.
      The column length defaults of char(1) and numeric(30,6) are now inserted
      in analyze.c's processing of CREATE TABLE.
      7476e371
  3. 16 Jan, 2000 1 commit
  4. 15 Jan, 2000 1 commit
  5. 10 Jan, 2000 1 commit
  6. 06 Jan, 2000 1 commit
  7. 10 Dec, 1999 1 commit
  8. 06 Dec, 1999 1 commit
    • Jan Wieck's avatar
      Completed FOREIGN KEY syntax. · b8ef7e7f
      Jan Wieck authored
      Added functionality for automatic trigger creation during CREATE TABLE.
      
      Added ON DELETE RESTRICT and some others.
      
      Jan
      b8ef7e7f
  9. 15 Nov, 1999 1 commit
    • Tom Lane's avatar
      Implement subselects in target lists. Also, relax requirement that · f68e11f3
      Tom Lane authored
      subselects can only appear on the righthand side of a binary operator.
      That's still true for quantified predicates like x = ANY (SELECT ...),
      but a subselect that delivers a single result can now appear anywhere
      in an expression.  This is implemented by changing EXPR_SUBLINK sublinks
      to represent just the (SELECT ...) expression, without any 'left hand
      side' or combining operator --- so they're now more like EXISTS_SUBLINK.
      To handle the case of '(x, y, z) = (SELECT ...)', I added a new sublink
      type MULTIEXPR_SUBLINK, which acts just like EXPR_SUBLINK used to.
      But the grammar will only generate one for a multiple-left-hand-side
      row expression.
      f68e11f3
  10. 07 Nov, 1999 1 commit
  11. 01 Nov, 1999 1 commit
  12. 07 Oct, 1999 1 commit
    • Tom Lane's avatar
      Fix planner and rewriter to follow SQL semantics for tables that are · 3eb1c822
      Tom Lane authored
      mentioned in FROM but not elsewhere in the query: such tables should be
      joined over anyway.  Aside from being more standards-compliant, this allows
      removal of some very ugly hacks for COUNT(*) processing.  Also, allow
      HAVING clause without aggregate functions, since SQL does.  Clean up
      CREATE RULE statement-list syntax the same way Bruce just fixed the
      main stmtmulti production.
      CAUTION: addition of a field to RangeTblEntry nodes breaks stored rules;
      you will have to initdb if you have any rules.
      3eb1c822
  13. 03 Oct, 1999 1 commit
    • Tom Lane's avatar
      Reimplement parsing and storage of default expressions and constraint · eabc714a
      Tom Lane authored
      expressions in CREATE TABLE.  There is no longer an emasculated expression
      syntax for these things; it's full a_expr for constraints, and b_expr
      for defaults (unfortunately the fact that NOT NULL is a part of the
      column constraint syntax causes a shift/reduce conflict if you try a_expr.
      Oh well --- at least parenthesized boolean expressions work now).  Also,
      stored expression for a column default is not pre-coerced to the column
      type; we rely on transformInsertStatement to do that when the default is
      actually used.  This means "f1 datetime default 'now'" behaves the way
      people usually expect it to.
      BTW, all the support code is now there to implement ALTER TABLE ADD
      CONSTRAINT and ALTER TABLE ADD COLUMN with a default value.  I didn't
      actually teach ALTER TABLE to call it, but it wouldn't be much work.
      eabc714a
  14. 18 Sep, 1999 1 commit
    • Tom Lane's avatar
      Mega-commit to make heap_open/heap_openr/heap_close take an · bd272cac
      Tom Lane authored
      additional argument specifying the kind of lock to acquire/release (or
      'NoLock' to do no lock processing).  Ensure that all relations are locked
      with some appropriate lock level before being examined --- this ensures
      that relevant shared-inval messages have been processed and should prevent
      problems caused by concurrent VACUUM.  Fix several bugs having to do with
      mismatched increment/decrement of relation ref count and mismatched
      heap_open/close (which amounts to the same thing).  A bogus ref count on
      a relation doesn't matter much *unless* a SI Inval message happens to
      arrive at the wrong time, which is probably why we got away with this
      sloppiness for so long.  Repair missing grab of AccessExclusiveLock in
      DROP TABLE, ALTER/RENAME TABLE, etc, as noted by Hiroshi.
      Recommend 'make clean all' after pulling this update; I modified the
      Relation struct layout slightly.
      Will post further discussion to pghackers list shortly.
      bd272cac
  15. 21 Aug, 1999 1 commit
    • Tom Lane's avatar
      Major revision of sort-node handling: push knowledge of query · db436adf
      Tom Lane authored
      sort order down into planner, instead of handling it only at the very top
      level of the planner.  This fixes many things.  An explicit sort is now
      avoided if there is a cheaper alternative (typically an indexscan) not
      only for ORDER BY, but also for the internal sort of GROUP BY.  It works
      even when there is no other reason (such as a WHERE condition) to consider
      the indexscan.  It works for indexes on functions.  It works for indexes
      on functions, backwards.  It's just so cool...
      
      CAUTION: I have changed the representation of SortClause nodes, therefore
      THIS UPDATE BREAKS STORED RULES.  You will need to initdb.
      db436adf
  16. 15 Aug, 1999 1 commit
  17. 19 Jul, 1999 1 commit
    • Tom Lane's avatar
      Rewrite parser's handling of INSERT ... SELECT so that processing · 7f76eab1
      Tom Lane authored
      of the SELECT part of the statement is just like a plain SELECT.  All
      INSERT-specific processing happens after the SELECT parsing is done.
      This eliminates many problems, e.g. INSERT ... SELECT ... GROUP BY using
      the wrong column labels.  Ensure that DEFAULT clauses are coerced to
      the target column type, whether or not stored clause produces the right
      type.  Substantial cleanup of parser's array support.
      7f76eab1
  18. 17 Jul, 1999 1 commit
  19. 16 Jul, 1999 1 commit
  20. 15 Jul, 1999 2 commits
  21. 13 Jul, 1999 1 commit
  22. 05 Jun, 1999 1 commit
  23. 25 May, 1999 2 commits
  24. 23 May, 1999 1 commit
  25. 17 May, 1999 2 commits
  26. 13 May, 1999 2 commits
  27. 12 May, 1999 1 commit
  28. 23 Feb, 1999 1 commit
  29. 21 Feb, 1999 1 commit
    • Marc G. Fournier's avatar
      · 8c3e8a8a
      Marc G. Fournier authored
      From: Tatsuo Ishii <t-ishii@sra.co.jp>
      
      Ok. I made patches replacing all of "#if FALSE" or "#if 0" to "#ifdef
      NOT_USED" for current. I have tested these patches in that the
      postgres binaries are identical.
      8c3e8a8a
  30. 13 Feb, 1999 1 commit
  31. 08 Feb, 1999 1 commit
  32. 02 Feb, 1999 1 commit
  33. 27 Jan, 1999 1 commit
    • Marc G. Fournier's avatar
      · 2ae5d516
      Marc G. Fournier authored
      From: Tatsuo Ishii <t-ishii@sra.co.jp>
      
      Included patches fix a portability problem of unsetenv() used in
      6.4.2 multi-byte support. unsetenv() is only avaliable on FreeBSD and
      Linux so I decided to replace with putenv().
      2ae5d516
  34. 25 Jan, 1999 1 commit
  35. 21 Jan, 1999 2 commits
    • Bruce Momjian's avatar
      The following patch finishes primary key support. Previously, when · c91dbcc5
      Bruce Momjian authored
      a field was labelled as a primary key, the system automatically
      created a unique index on the field.  This patch extends it so
      that the index has the indisprimary field set.  You can pull a list
      of primary keys with the followiing select.
      
      SELECT pg_class.relname, pg_attribute.attname
          FROM pg_class, pg_attribute, pg_index
          WHERE pg_class.oid = pg_attribute.attrelid AND
              pg_class.oid = pg_index.indrelid AND
              pg_index.indkey[0] = pg_attribute.attnum AND
              pg_index.indisunique = 't';
      
      There is nothing in this patch that modifies the template database to
      set the indisprimary attribute for system tables.  Should they be
      changed or should we only be concerned with user tables?
      
      D'Arcy
      c91dbcc5
    • Vadim B. Mikheev's avatar
      FOR UPDATE is in parser & rules. · 12be3e08
      Vadim B. Mikheev authored
      12be3e08