1. 13 Aug, 2010 4 commits
    • Tom Lane's avatar
      Fix Assert failure in PushOverrideSearchPath when trying to restore a search · 2a7349f0
      Tom Lane authored
      path that specifies useTemp, but there is no active temp schema in the
      current session.  (This can happen if the path was saved during a transaction
      that created a temp schema and was later rolled back.)  For existing callers
      it's sufficient to ignore the useTemp flag in this case, though we might
      later want to offer an option to create a fresh temp schema.  So far as I can
      tell this is just an Assert failure: in a non-assert build, the code would
      push a zero onto the new search path, which is useless but not very harmful.
      Per bug report from Heikki.
      
      Back-patch to 8.3; prior versions don't have this code.
      2a7349f0
    • Robert Haas's avatar
      Make RecordTransactionCommit() respect wal_level. · 95ef7cd4
      Robert Haas authored
      Since the only purpose of WAL-loggin SharedInvalidationMessages is to support
      Hot Standby operation, they needn't be included when wal_level < hot_standby.
      
      Back-patch to 9.0.
      
      Review by Heikki Linnakanagas and Fujii Masao.
      95ef7cd4
    • Tom Lane's avatar
      Fix pg_restore to complain if any arguments remain after parsing the switches · e4155c84
      Tom Lane authored
      and input file name, per bug #5617 from Leo Shklovskii.  Rearrange the
      corresponding code in pg_dump and pg_dumpall so that all three programs
      handle this in a consistent, straightforward fashion.
      
      Back-patch to 9.0, but no further.  Although this is certainly a bug, it's
      possible that people have scripts that will be broken by the added error
      check, so it seems better not to change the behavior in stable branches.
      e4155c84
    • Robert Haas's avatar
      Reorder docs on lexical structure slightly for clarity. · 9b0a8686
      Robert Haas authored
      Thom Brown
      9b0a8686
  2. 12 Aug, 2010 5 commits
  3. 11 Aug, 2010 4 commits
  4. 10 Aug, 2010 5 commits
  5. 09 Aug, 2010 3 commits
    • Tom Lane's avatar
      Fix incorrect logic in plpgsql for cleanup after evaluation of non-simple · 46af71ff
      Tom Lane authored
      expressions.  We need to deal with this when handling subscripts in an array
      assignment, and also when catching an exception.  In an Assert-enabled build
      these omissions led to Assert failures, but I think in a normal build the
      only consequence would be short-term memory leakage; which may explain why
      this wasn't reported from the field long ago.
      
      Back-patch to all supported versions.  7.4 doesn't have exceptions, but
      otherwise these bugs go all the way back.
      
      Heikki Linnakangas and Tom Lane
      46af71ff
    • Robert Haas's avatar
      Provide stable target anchors for libpq functions. · 47731982
      Robert Haas authored
      Daniele Varrazzo
      47731982
    • Tom Lane's avatar
      Modify the handling of RAISE without parameters so that the error it throws · 2e35d4f3
      Tom Lane authored
      can be caught in the same places that could catch an ordinary RAISE ERROR
      in the same location.  The previous coding insisted on throwing the error
      from the block containing the active exception handler; which is arguably
      more surprising, and definitely unlike Oracle's behavior.
      
      Not back-patching, since this is a pretty obscure corner case.  The risk
      of breaking somebody's code in a minor version update seems to outweigh
      any possible benefit.
      
      Piyush Newe, reviewed by David Fetter
      2e35d4f3
  6. 08 Aug, 2010 2 commits
  7. 07 Aug, 2010 2 commits
    • Bruce Momjian's avatar
      Fix 9.0 release notes vacuum mention, not -> now · 83f5491c
      Bruce Momjian authored
      Peter Fokkinga
      83f5491c
    • Tom Lane's avatar
      Recognize functional dependency on primary keys. This allows a table's · e49ae8d3
      Tom Lane authored
      other columns to be referenced without listing them in GROUP BY, so long as
      the primary key column(s) are listed in GROUP BY.
      
      Eventually we should also allow functional dependency on a UNIQUE constraint
      when the columns are marked NOT NULL, but that has to wait until NOT NULL
      constraints are represented in pg_constraint, because we need to have
      pg_constraint OIDs for all the conditions needed to ensure functional
      dependency.
      
      Peter Eisentraut, reviewed by Alex Hunsaker and Tom Lane
      e49ae8d3
  8. 06 Aug, 2010 6 commits
  9. 05 Aug, 2010 6 commits
    • Tom Lane's avatar
      Add a very specific hint for the case that we're unable to locate a function · 1e4c050b
      Tom Lane authored
      matching a call like f(x, ORDER BY y,z).  It could be that what the user
      really wants is f(x,z ORDER BY y).  We now have pretty conclusive evidence
      that many people won't understand this problem without concrete guidance,
      so give it to them.  Per further discussion of the string_agg() problem.
      1e4c050b
    • Peter Eisentraut's avatar
    • Tom Lane's avatar
      Remove the single-argument form of string_agg(). It added nothing much in · b0c451e1
      Tom Lane authored
      functionality, while creating an ambiguity in usage with ORDER BY that at
      least two people have already gotten seriously confused by.  Also, add an
      opr_sanity test to check that we don't in future violate the newly minted
      policy of not having built-in aggregates with the same name and different
      numbers of parameters.  Per discussion of a complaint from Thom Brown.
      b0c451e1
    • Robert Haas's avatar
      Standardize get_whatever_oid functions for other object types. · fd1843ff
      Robert Haas authored
      - Rename TSParserGetPrsid to get_ts_parser_oid.
      - Rename TSDictionaryGetDictid to get_ts_dict_oid.
      - Rename TSTemplateGetTmplid to get_ts_template_oid.
      - Rename TSConfigGetCfgid to get_ts_config_oid.
      - Rename FindConversionByName to get_conversion_oid.
      - Rename GetConstraintName to get_constraint_oid.
      - Add new functions get_opclass_oid, get_opfamily_oid, get_rewrite_oid,
        get_rewrite_oid_without_relid, get_trigger_oid, and get_cast_oid.
      
      The name of each function matches the corresponding catalog.
      
      Thanks to KaiGai Kohei for the review.
      fd1843ff
    • Robert Haas's avatar
      Standardize get_whatever_oid functions for object types with · 2a6ef344
      Robert Haas authored
      unqualified names.
      
      - Add a missing_ok parameter to get_tablespace_oid.
      - Avoid duplicating get_tablespace_od guts in objectNamesToOids.
      - Add a missing_ok parameter to get_database_oid.
      - Replace get_roleid and get_role_checked with get_role_oid.
      - Add get_namespace_oid, get_language_oid, get_am_oid.
      - Refactor existing code to use new interfaces.
      
      Thanks to KaiGai Kohei for the review.
      2a6ef344
    • Peter Eisentraut's avatar
      Add xmlexists function · 641459f2
      Peter Eisentraut authored
      by Mike Fowler, reviewed by Peter Eisentraut
      641459f2
  10. 04 Aug, 2010 3 commits