1. 06 Apr, 2002 1 commit
  2. 05 Apr, 2002 1 commit
  3. 29 Mar, 2002 2 commits
  4. 22 Mar, 2002 1 commit
    • Tom Lane's avatar
      A little further progress on schemas: push down RangeVars into · 108a0ec8
      Tom Lane authored
      addRangeTableEntry calls.  Remove relname field from RTEs, since
      it will no longer be a useful unique identifier of relations;
      we want to encourage people to rely on the relation OID instead.
      Further work on dumping qual expressions in EXPLAIN, too.
      108a0ec8
  5. 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
  6. 20 Mar, 2002 1 commit
  7. 12 Mar, 2002 1 commit
    • Tom Lane's avatar
      Restructure representation of join alias variables. An explicit JOIN · 6eeb95f0
      Tom Lane authored
      now has an RTE of its own, and references to its outputs now are Vars
      referencing the JOIN RTE, rather than CASE-expressions.  This allows
      reverse-listing in ruleutils.c to use the correct alias easily, rather
      than painfully reverse-engineering the alias namespace as it used to do.
      Also, nested FULL JOINs work correctly, because the result of the inner
      joins are simple Vars that the planner can cope with.  This fixes a bug
      reported a couple times now, notably by Tatsuo on 18-Nov-01.  The alias
      Vars are expanded into COALESCE expressions where needed at the very end
      of planning, rather than during parsing.
      Also, beginnings of support for showing plan qualifier expressions in
      EXPLAIN.  There are probably still cases that need work.
      initdb forced due to change of stored-rule representation.
      6eeb95f0
  8. 19 Feb, 2002 1 commit
    • Tom Lane's avatar
      A bunch of changes aimed at reducing backend startup time... · 78634044
      Tom Lane authored
      Improve 'pg_internal.init' relcache entry preload mechanism so that it is
      safe to use for all system catalogs, and arrange to preload a realistic
      set of system-catalog entries instead of only the three nailed-in-cache
      indexes that were formerly loaded this way.  Fix mechanism for deleting
      out-of-date pg_internal.init files: this must be synchronized with transaction
      commit, not just done at random times within transactions.  Drive it off
      relcache invalidation mechanism so that no special-case tests are needed.
      
      Cache additional information in relcache entries for indexes (their pg_index
      tuples and index-operator OIDs) to eliminate repeated lookups.  Also cache
      index opclass info at the per-opclass level to avoid repeated lookups during
      relcache load.
      
      Generalize 'systable scan' utilities originally developed by Hiroshi,
      move them into genam.c, use in a number of places where there was formerly
      ugly code for choosing either heap or index scan.  In particular this allows
      simplification of the logic that prevents infinite recursion between syscache
      and relcache during startup: we can easily switch to heapscans in relcache.c
      when and where needed to avoid recursion, so IndexScanOK becomes simpler and
      does not need any expensive initialization.
      
      Eliminate useless opening of a heapscan data structure while doing an indexscan
      (this saves an mdnblocks call and thus at least one kernel call).
      78634044
  9. 12 Dec, 2001 1 commit
  10. 12 Nov, 2001 1 commit
  11. 02 Nov, 2001 1 commit
    • Tom Lane's avatar
      Fix problem reported by Alex Korn: if a relation has been dropped and · 7d053108
      Tom Lane authored
      recreated since the start of our transaction, our first reference to it
      errored out because we'd try to reuse our old relcache entry for it.
      Do this by accepting SI inval messages just before relcache search in
      heap_openr, so that dead relcache entries will be flushed before we
      search.  Also, break heap_open/openr into two pairs of routines,
      relation_open(r) and heap_open(r).  The relation_open routines make
      no tests on relkind and so can be used to open anything that has a
      pg_class entry.  The heap_open routines are wrappers that add a relkind
      test to preserve their established behavior.  Use the relation_open
      routines in several places that had various kluge solutions for opening
      rels that might be either heap or index rels.
      
      Also, remove the old 'heap stats' code that's been superseded by Jan's
      stats collector, and clean up some inconsistencies in error reporting
      between the different types of ALTER TABLE.
      7d053108
  12. 25 Oct, 2001 1 commit
  13. 04 Oct, 2001 1 commit
    • Tom Lane's avatar
      Consider interpreting a function call as a trivial (binary-compatible) · 03b0a589
      Tom Lane authored
      type coercion after failing to find an exact match in pg_proc, but before
      considering interpretations that involve a function call with one or
      more argument type coercions.  This avoids surprises wherein what looks
      like a type coercion is interpreted as coercing to some third type and
      then to the destination type, as in Dave Blasby's bug report of 3-Oct-01.
      See subsequent discussion in pghackers.
      03b0a589
  14. 09 Aug, 2001 1 commit
  15. 22 Jun, 2001 1 commit
  16. 19 May, 2001 3 commits
  17. 18 May, 2001 3 commits
  18. 18 Apr, 2001 1 commit
  19. 22 Mar, 2001 1 commit
  20. 14 Mar, 2001 1 commit
  21. 14 Feb, 2001 1 commit
    • Tom Lane's avatar
      Change scoping of table and join refnames to conform to SQL92: a JOIN · 4a66f9dd
      Tom Lane authored
      clause with an alias is a <subquery> and therefore hides table references
      appearing within it, according to the spec.  This is the same as the
      preliminary patch I posted to pgsql-patches yesterday, plus some really
      grotty code in ruleutils.c to reverse-list a query tree with the correct
      alias name depending on context.  I'd rather not have done that, but unless
      we want to force another initdb for 7.1, there's no other way for now.
      4a66f9dd
  22. 24 Jan, 2001 1 commit
  23. 23 Jan, 2001 1 commit
  24. 27 Dec, 2000 1 commit
    • Tom Lane's avatar
      Fix portability problems recently exposed by regression tests on Alphas. · 8609d4ab
      Tom Lane authored
      1. Distinguish cases where a Datum representing a tuple datatype is an OID
      from cases where it is a pointer to TupleTableSlot, and make sure we use
      the right typlen in each case.
      2. Make fetchatt() and related code support 8-byte by-value datatypes on
      machines where Datum is 8 bytes.  Centralize knowledge of the available
      by-value datatype sizes in two macros in tupmacs.h, so that this will be
      easier if we ever have to do it again.
      8609d4ab
  25. 15 Dec, 2000 1 commit
  26. 16 Nov, 2000 1 commit
  27. 11 Nov, 2000 1 commit
  28. 06 Nov, 2000 1 commit
  29. 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
  30. 12 Sep, 2000 1 commit
  31. 24 Aug, 2000 1 commit
  32. 20 Aug, 2000 1 commit
  33. 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
  34. 03 Aug, 2000 1 commit
    • Tom Lane's avatar
      Modify heap_open()/heap_openr() API per pghackers discussion of 11 July. · 61aca818
      Tom Lane authored
      These two routines will now ALWAYS elog() on failure, whether you ask for
      a lock or not.  If you really want to get a NULL return on failure, call
      the new routines heap_open_nofail()/heap_openr_nofail().  By my count there
      are only about three places that actually want that behavior.  There were
      rather more than three places that were missing the check they needed to
      make under the old convention :-(.
      61aca818
  35. 15 Jun, 2000 1 commit