1. 14 Feb, 2001 2 commits
  2. 27 Jan, 2001 1 commit
  3. 24 Jan, 2001 1 commit
  4. 19 Jan, 2001 1 commit
  5. 08 Jan, 2001 1 commit
  6. 05 Jan, 2001 1 commit
    • Tom Lane's avatar
      Remove not-really-standard implementation of CREATE TABLE's UNDER clause, · 2fb6cc90
      Tom Lane authored
      and revert documentation to describe the existing INHERITS clause
      instead, per recent discussion in pghackers.  Also fix implementation
      of SQL_inheritance SET variable: it is not cool to look at this var
      during the initial parsing phase, only during parse_analyze().  See
      recent bug report concerning misinterpretation of date constants just
      after a SET TIMEZONE command.  gram.y really has to be an invariant
      transformation of the query string to a raw parsetree; anything that
      can vary with time must be done during parse analysis.
      2fb6cc90
  7. 18 Dec, 2000 1 commit
  8. 07 Dec, 2000 1 commit
  9. 06 Dec, 2000 1 commit
  10. 05 Dec, 2000 2 commits
    • Tom Lane's avatar
      From Stephan Szabo: · 981a7d32
      Tom Lane authored
      I believe this should fix the issue that Philip Warner
      noticed about the check for unique constraints meeting the
      referenced keys of a foreign key constraint allowing the
      specification of a subset of a foreign key instead of
      rejecting it.  I also added tests for a base case of
      this to the foreign key and alter table tests and patches
      for expected output.
      981a7d32
    • Tom Lane's avatar
      Repair breakage of rules containing INSERT ... SELECT actions, per bug · a51f004d
      Tom Lane authored
      report from Joel Burton.  Turns out that my simple idea of turning the
      SELECT into a subquery does not interact well *at all* with the way the
      rule rewriter works.  Really what we need to make INSERT ... SELECT work
      cleanly is to decouple targetlists from rangetables: an INSERT ... SELECT
      wants to have two levels of targetlist but only one rangetable.  No time
      for that for 7.1, however, so I've inserted some ugly hacks to make the
      rewriter know explicitly about the structure of INSERT ... SELECT queries.
      Ugh :-(
      a51f004d
  11. 24 Nov, 2000 1 commit
  12. 18 Nov, 2000 1 commit
  13. 16 Nov, 2000 1 commit
  14. 08 Nov, 2000 1 commit
    • Tom Lane's avatar
      Make DROP TABLE rollback-able: postpone physical file delete until commit. · 3908473c
      Tom Lane authored
      (WAL logging for this is not done yet, however.)  Clean up a number of really
      crufty things that are no longer needed now that DROP behaves nicely.  Make
      temp table mapper do the right things when drop or rename affecting a temp
      table is rolled back.  Also, remove "relation modified while in use" error
      check, in favor of locking tables at first reference and holding that lock
      throughout the statement.
      3908473c
  15. 05 Nov, 2000 2 commits
  16. 04 Nov, 2000 1 commit
  17. 07 Oct, 2000 1 commit
    • Tom Lane's avatar
      Arrange that no database accesses are attempted during parser() --- this · fbd26d69
      Tom Lane authored
      took some rejiggering of typename and ACL parsing, as well as moving
      parse_analyze call out of parser().  Restructure postgres.c processing
      so that parse analysis and rewrite are skipped when in abort-transaction
      state.  Only COMMIT and ABORT statements will be processed beyond the raw
      parser() phase.  This addresses problem of parser failing with database access
      errors while in aborted state (see pghackers discussions around 7/28/00).
      Also fix some bugs with COMMIT/ABORT statements appearing in the middle of
      a single query input string.
      Function, operator, and aggregate arguments/results can now use full
      TypeName production, in particular foo[] for array types.
      DROP OPERATOR and COMMENT ON OPERATOR were broken for unary operators.
      Allow CREATE AGGREGATE to accept unquoted numeric constants for initcond.
      fbd26d69
  18. 05 Oct, 2000 1 commit
    • Tom Lane's avatar
      Reimplementation of UNION/INTERSECT/EXCEPT. INTERSECT/EXCEPT now meet the · 05e3d0ee
      Tom Lane authored
      SQL92 semantics, including support for ALL option.  All three can be used
      in subqueries and views.  DISTINCT and ORDER BY work now in views, too.
      This rewrite fixes many problems with cross-datatype UNIONs and INSERT/SELECT
      where the SELECT yields different datatypes than the INSERT needs.  I did
      that by making UNION subqueries and SELECT in INSERT be treated like
      subselects-in-FROM, thereby allowing an extra level of targetlist where the
      datatype conversions can be inserted safely.
      INITDB NEEDED!
      05e3d0ee
  19. 29 Sep, 2000 1 commit
    • Tom Lane's avatar
      Subselects in FROM clause, per ISO syntax: FROM (SELECT ...) [AS] alias. · 3a94e789
      Tom Lane authored
      (Don't forget that an alias is required.)  Views reimplemented as expanding
      to subselect-in-FROM.  Grouping, aggregates, DISTINCT in views actually
      work now (he says optimistically).  No UNION support in subselects/views
      yet, but I have some ideas about that.  Rule-related permissions checking
      moved out of rewriter and into executor.
      INITDB REQUIRED!
      3a94e789
  20. 25 Sep, 2000 1 commit
    • Bruce Momjian's avatar
      the patch include: · ebdfac3b
      Bruce Momjian authored
              - rename ichar() to chr() (discussed with Tom)
      
              - add docs for oracle compatible routines:
      
                      btrim()
                      ascii()
                      chr()
                      repeat()
      
              - fix bug with timezone in to_char()
      
              - all to_char() variants return NULL instead textin("")
                if it's needful.
      
       The contrib/odbc is without changes and contains same routines as main
      tree ... because I not sure how plans are Thomas with this :-)
      
                                              Karel
      ---------------------------------------------------------------------------
      
      This effectively one line patch should fix the fact that
      foreign key definitions in create table were erroring if
      a primary key was defined.  I was using the columns
      list to get the columns of the table for comparison, but
      it got reused as a temporary list inside the primary key
      stuff.
      
      Stephan Szabo
      ebdfac3b
  21. 12 Sep, 2000 1 commit
  22. 29 Aug, 2000 1 commit
    • Bruce Momjian's avatar
      This is mostly the same as an earlier patch I · d4f62650
      Bruce Momjian authored
      didn't hear anything about, but which would
      have broken with the function manager changes
      anyway.
      
      Well, this patch checks that a unique constraint
      of some form (unique or pk) is on the referenced
      columns of an FK constraint and that the columns
      in the referencing table exist at creation time.
      The former is to move closer to SQL compatibility
      and the latter is in answer to a bug report.
      I also added a basic check of this functionality
      to the alter table and foreign key regression
      tests.
      
      Stephan Szabo
      sszabo@bigpanda.com
      d4f62650
  23. 22 Aug, 2000 1 commit
  24. 11 Aug, 2000 1 commit
    • Tom Lane's avatar
      copyObject() and equal() now know about all parse-time node types, · 4951a882
      Tom Lane authored
      including utility statements.  Still can't copy or compare executor
      state, but at present that doesn't seem to be necessary.  This makes
      it possible to execute most (all?) utility statements in plpgsql.
      Had to change parsetree representation of CreateTrigStmt so that it
      contained only legal Nodes, and not bare string constants.
      4951a882
  25. 08 Aug, 2000 1 commit
    • Tom Lane's avatar
      Remove 'func_tlist' from Func expression nodes, likewise 'param_tlist' · 62e29fe2
      Tom Lane authored
      from Param nodes, per discussion a few days ago on pghackers.  Add new
      expression node type FieldSelect that implements the functionality where
      it's actually needed.  Clean up some other unused fields in Func nodes
      as well.
      NOTE: initdb forced due to change in stored expression trees for rules.
      62e29fe2
  26. 03 Aug, 2000 1 commit
  27. 15 Jul, 2000 1 commit
  28. 14 Jul, 2000 1 commit
    • Thomas G. Lockhart's avatar
      Implement nested block comments in the backend and in psql. · be703cd9
      Thomas G. Lockhart authored
       Include updates for the comment.sql regression test.
      Implement SET SESSION CHARACTERISTICS and SET DefaultXactIsoLevel.
      Implement SET SESSION CHARACTERISTICS TRANSACTION COMMIT
       and SET AutoCommit in the parser only.
       Need to add code to actually do something.
      Implement WITHOUT TIME ZONE type qualifier.
      Define SCHEMA keyword, along with stubbed-out grammar.
      Implement "[IN|INOUT|OUT] [varname] type" function arguments
       in parser only; INOUT and OUT throws an elog(ERROR).
      Add PATH as a type-specific token, since PATH is in SQL99
       to support schema resource search and resolution.
      be703cd9
  29. 02 Jul, 2000 1 commit
  30. 17 Jun, 2000 1 commit
    • Tom Lane's avatar
      Fix performance problems with pg_index lookups (see, for example, · d03a933e
      Tom Lane authored
      discussion of 5/19/00).  pg_index is now searched for indexes of a
      relation using an indexscan.  Moreover, this is done once and cached
      in the relcache entry for the relation, in the form of a list of OIDs
      for the indexes.  This list is used by the parser and executor to drive
      lookups in the pg_index syscache when they want to know the properties
      of the indexes.  Net result: index information will be fully cached
      for repetitive operations such as inserts.
      d03a933e
  31. 12 Jun, 2000 1 commit
  32. 09 Jun, 2000 1 commit
  33. 30 May, 2000 1 commit
  34. 29 May, 2000 1 commit
  35. 28 May, 2000 1 commit
    • Tom Lane's avatar
      First round of changes for new fmgr interface. fmgr itself and the · 0a7fb4e9
      Tom Lane authored
      key call sites are changed, but most called functions are still oldstyle.
      An exception is that the PL managers are updated (so, for example, NULL
      handling now behaves as expected in plperl and plpgsql functions).
      NOTE initdb is forced due to added column in pg_proc.
      0a7fb4e9
  36. 12 Apr, 2000 1 commit
  37. 24 Mar, 2000 1 commit
    • Tom Lane's avatar
      transformCreateStmt should put Ident nodes, not ColumnDef nodes, into · 5c462bae
      Tom Lane authored
      keys lists of Constraint nodes.  This eliminates a type pun that would
      probably have caused trouble someday, and eliminates circular references
      in the parsetree that were causing trouble now.
      Also, change parser's uses of strcasecmp() to strcmp().  Since scan.l
      has downcased any unquoted identifier, it is never correct to check an
      identifier with strcasecmp() in the parser.  For example,
      	CREATE TABLE FOO (f1 int, UNIQUE("F1"));
      was accepted, which is wrong, and xlateSqlFunc did more than it should:
      select datetime();
      ERROR:  Function 'timestamp()' does not exist
      (good)
      select "DateTime"();
      ERROR:  Function 'timestamp()' does not exist
      (bad)
      5c462bae