1. 13 Aug, 2010 9 commits
    • Robert Haas's avatar
      Fix assorted dtrace breakage caused by patch to include backend IDs · 105d4c5f
      Robert Haas authored
      in temp relpaths.
      
      Per buildfarm.
      105d4c5f
    • Tom Lane's avatar
      Clean up failure to use ClosePager() where appropriate in help.c. · 36ba263d
      Tom Lane authored
      Also prevent possible repeat opening of pager in helpSQL().
      36ba263d
    • Robert Haas's avatar
      Include the backend ID in the relpath of temporary relations. · debcec7d
      Robert Haas authored
      This allows us to reliably remove all leftover temporary relation
      files on cluster startup without reference to system catalogs or WAL;
      therefore, we no longer include temporary relations in XLOG_XACT_COMMIT
      and XLOG_XACT_ABORT WAL records.
      
      Since these changes require including a backend ID in each
      SharedInvalSmgrMsg, the size of the SharedInvalidationMessage.id
      field has been reduced from two bytes to one, and the maximum number
      of connections has been reduced from INT_MAX / 4 to 2^23-1.  It would
      be possible to remove these restrictions by increasing the size of
      SharedInvalidationMessage by 4 bytes, but right now that doesn't seem
      like a good trade-off.
      
      Review by Jaime Casanova and Tom Lane.
      debcec7d
    • Tom Lane's avatar
      Minor #include cleanup. · 3f9479ef
      Tom Lane authored
      I just noticed that libpq's pqsignal.h was violating our general inclusion
      style guidelines by explicitly including postgres_fe.h.  Remove that, and
      put it in pqsignal.c where it belongs.
      3f9479ef
    • Tom Lane's avatar
      Add xml_is_well_formed, xml_is_well_formed_document, xml_is_well_formed_content · a0b7b717
      Tom Lane authored
      functions to the core XML code.  Per discussion, the former depends on
      XMLOPTION while the others do not.  These supersede a version previously
      offered by contrib/xml2.
      
      Mike Fowler, reviewed by Pavel Stehule
      a0b7b717
    • 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 4 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