Skip to content
Snippets Groups Projects
  1. Jan 05, 2001
    • 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
  2. Dec 18, 2000
  3. Dec 07, 2000
  4. Dec 05, 2000
    • 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
  5. Nov 24, 2000
  6. Nov 18, 2000
  7. Nov 16, 2000
  8. Nov 08, 2000
    • 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
  9. Nov 05, 2000
  10. Nov 04, 2000
  11. Oct 07, 2000
    • 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
  12. Oct 05, 2000
    • 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
  13. Sep 29, 2000
    • 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
  14. Sep 25, 2000
    • 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
  15. Sep 12, 2000
  16. Aug 29, 2000
    • 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
  17. Aug 22, 2000
  18. Aug 12, 2000
    • 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
  19. Aug 08, 2000
    • 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
  20. Aug 03, 2000
  21. Jul 15, 2000
  22. Jul 14, 2000
    • 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
  23. Jul 02, 2000
  24. Jun 17, 2000
    • 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
  25. Jun 12, 2000
  26. Jun 09, 2000
  27. May 30, 2000
  28. May 29, 2000
  29. May 28, 2000
    • 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
  30. Apr 12, 2000
  31. Mar 25, 2000
    • 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
  32. Mar 15, 2000
    • Thomas G. Lockhart's avatar
      Implement column aliases on views "CREATE VIEW name (collist)". · 64568100
      Thomas G. Lockhart authored
      Implement TIME WITH TIME ZONE type (timetz internal type).
      Remap length() for character strings to CHAR_LENGTH() for SQL92
       and to remove the ambiguity with geometric length() functions.
      Keep length() for character strings for backward compatibility.
      Shrink stored views by removing internal column name list from visible rte.
      Implement min(), max() for time and timetz data types.
      Implement conversion of TIME to INTERVAL.
      Implement abs(), mod(), fac() for the int8 data type.
      Rename some math functions to generic names:
       round(), sqrt(), cbrt(), pow(), etc.
      Rename NUMERIC power() function to pow().
      Fix int2 factorial to calculate result in int4.
      Enhance the Oracle compatibility function translate() to work with string
       arguments (from Edwin Ramirez).
      Modify pg_proc system table to remove OID holes.
      64568100
  33. Mar 01, 2000
  34. Feb 29, 2000
  35. Feb 15, 2000
  36. Feb 05, 2000
  37. Feb 04, 2000
Loading