1. 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
  2. 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
  3. 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
  4. 06 Mar, 2002 2 commits
    • Bruce Momjian's avatar
      3d9f865e
    • Bruce Momjian's avatar
      Change made to elog: · 92288a1c
      Bruce Momjian authored
      o  Change all current CVS messages of NOTICE to WARNING.  We were going
      to do this just before 7.3 beta but it has to be done now, as you will
      see below.
      
      o Change current INFO messages that should be controlled by
      client_min_messages to NOTICE.
      
      o Force remaining INFO messages, like from EXPLAIN, VACUUM VERBOSE, etc.
      to always go to the client.
      
      o Remove INFO from the client_min_messages options and add NOTICE.
      
      Seems we do need three non-ERROR elog levels to handle the various
      behaviors we need for these messages.
      
      Regression passed.
      92288a1c
  5. 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
  6. 26 Nov, 2001 2 commits
  7. 19 Nov, 2001 1 commit
  8. 25 Oct, 2001 1 commit
  9. 08 Oct, 2001 1 commit
  10. 04 Oct, 2001 1 commit
  11. 01 Oct, 2001 1 commit
    • Tom Lane's avatar
      Extend pg_get_indexdef() to know about index predicates. Also, tweak · e5bbf196
      Tom Lane authored
      it to suppress index opclass output for opclasses that are the default
      for their datatype; only non-default opclasses are shown explicitly.
      This is expected to improve portability of the CREATE INDEX command
      across future versions of Postgres --- we've changed index opclasses
      too often in the past to think we won't do so again.
      e5bbf196
  12. 12 Aug, 2001 1 commit
  13. 31 Jul, 2001 1 commit
  14. 16 Jul, 2001 1 commit
  15. 10 Jul, 2001 1 commit
  16. 19 Jun, 2001 1 commit
  17. 18 Apr, 2001 1 commit
  18. 15 Apr, 2001 1 commit
    • Tom Lane's avatar
      Constant expressions that appear in ORDER BY, GROUP BY, DISTINCT ON · ffbeafb1
      Tom Lane authored
      lists should be reverse-compiled into targetlist index numbers, because
      that's the only interpretation the parser allows for a constant in these
      clauses.  (Ergo, the only way they could have gotten into the list in
      the first place is to have come from the targetlist; so this should always
      work.)  Per problem report from Peter E.
      ffbeafb1
  19. 22 Mar, 2001 2 commits
  20. 21 Feb, 2001 1 commit
    • Tom Lane's avatar
      Change case-folding of keywords to conform to SQL99 and fix misbehavior · be92ad49
      Tom Lane authored
      in Turkish locale.  Keywords are now checked under pure ASCII case-folding
      rules ('A'-'Z'->'a'-'z' and nothing else).  However, once a word is
      determined not to be a keyword, it will be case-folded under the current
      locale, same as before.  See pghackers discussion 20-Feb-01.
      be92ad49
  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. 03 Jan, 2001 1 commit
  23. 18 Nov, 2000 1 commit
  24. 16 Nov, 2000 1 commit
  25. 05 Nov, 2000 1 commit
  26. 26 Oct, 2000 1 commit
  27. 05 Oct, 2000 2 commits
  28. 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
  29. 25 Sep, 2000 1 commit
  30. 18 Sep, 2000 1 commit
  31. 12 Sep, 2000 2 commits
    • Tom Lane's avatar
      First cut at full support for OUTER JOINs. There are still a few loose · ed5003c5
      Tom Lane authored
      ends to clean up (see my message of same date to pghackers), but mostly
      it works.  INITDB REQUIRED!
      ed5003c5
    • Bruce Momjian's avatar
      O.K. - · 0ba0e321
      Bruce Momjian authored
      Here's the multibyte aware version of my patch to fix the truncation
      of the rulename autogenerated during a CREATE VIEW. I've modified all
      the places in the backend that want to construct the rulename to use
      the MakeRetrieveViewRuleName(), where I put the #ifdef MULTIBYTE, so
      that's the only place that knows how to construct a view rulename. Except
      pg_dump, where I replicated the code, since it's a standalone binary.
      
      The only effect the enduser will see is that views with names len(name)
      > NAMEDATALEN-4 will fail to be created, if the derived rulename clases
      with an existing rule: i.e. the user is trying to create two views with
      long names whose first difference is past NAMEDATALEN-4 (but before
      NAMEDATALEN: that'll error out after the viewname truncation.) In no
      case will the user get left with a table without a view rule, as the
      current code does.
      
      Ross Reedstrom
      0ba0e321
  32. 12 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. 06 Jul, 2000 2 commits