Skip to content
Snippets Groups Projects
  1. Nov 08, 2011
    • Robert Haas's avatar
      Fix hstore regression tests. · bb1afb52
      Robert Haas authored
      This was an oversight in commit b60653bc.
      
      Also, fix a typo spotted by Thom Brown.
      bb1afb52
    • Robert Haas's avatar
      Remove hstore's text => text operator. · b60653bc
      Robert Haas authored
      Since PostgreSQL 9.0, we've emitted a warning message when an operator
      named => is created, because the SQL standard now reserves that token
      for another use.  But we've also shipped such an operator with hstore.
      Use of the function hstore(text, text) has been recommended in
      preference to =>(text, text).  Per discussion, it's now time to take
      the next step and stop shipping the operator.  This will allow us to
      prohibit the use of => as an operator name in a future release if and
      when we wish to support the SQL standard use of this token.
      
      The release notes should mention this incompatibility.
      
      Patch by me, reviewed by David Wheeler, Dimitri Fontaine and Tom Lane.
      b60653bc
  2. Nov 07, 2011
    • Tom Lane's avatar
      Fix assorted bugs in contrib/unaccent's configuration file parsing. · ced3a93c
      Tom Lane authored
      Make it use t_isspace() to identify whitespace, rather than relying on
      sscanf which is known to get it wrong on some platform/locale combinations.
      Get rid of fixed-size buffers.  Make it actually continue to parse the file
      after ignoring a line with untranslatable characters, as was obviously
      intended.
      
      The first of these issues is per gripe from J Smith, though not exactly
      either of his proposed patches.
      ced3a93c
  3. Nov 04, 2011
  4. Nov 03, 2011
  5. Nov 01, 2011
  6. Oct 29, 2011
  7. Oct 28, 2011
  8. Oct 12, 2011
    • Tom Lane's avatar
      Throw a useful error message if an extension script file is fed to psql. · 458857cc
      Tom Lane authored
      We have seen one too many reports of people trying to use 9.1 extension
      files in the old-fashioned way of sourcing them in psql.  Not only does
      that usually not work (due to failure to substitute for MODULE_PATHNAME
      and/or @extschema@), but if it did work they'd get a collection of loose
      objects not an extension.  To prevent this, insert an \echo ... \quit
      line that prints a suitable error message into each extension script file,
      and teach commands/extension.c to ignore lines starting with \echo.
      That should not only prevent any adverse consequences of loading a script
      file the wrong way, but make it crystal clear to users that they need to
      do it differently now.
      
      Tom Lane, following an idea of Andrew Dunstan's.  Back-patch into 9.1
      ... there is not going to be much value in this if we wait till 9.2.
      458857cc
  9. Oct 10, 2011
  10. Oct 07, 2011
  11. Oct 06, 2011
    • Robert Haas's avatar
      Make pgstatindex respond to cancel interrupts. · 1cb018dd
      Robert Haas authored
      A similar problem for pgstattuple() was fixed in April of 2010 by commit
      33065ef8, but pgstatindex() seems to have
      been overlooked.
      
      Back-patch all the way, as with that commit, though not to 7.4 through
      8.1, since those are now EOL.
      1cb018dd
  12. Oct 05, 2011
    • Tom Lane's avatar
      Improve define_custom_variable's handling of pre-existing settings. · 41e461d3
      Tom Lane authored
      Arrange for any problems with pre-existing settings to be reported as
      WARNING not ERROR, so that we don't undesirably abort the loading of the
      incoming add-on module.  The bad setting is just discarded, as though it
      had never been applied at all.  (This requires a change in the API of
      set_config_option.  After some thought I decided the most potentially
      useful addition was to allow callers to just pass in a desired elevel.)
      
      Arrange to restore the complete stacked state of the variable, rather than
      cheesily reinstalling only the active value.  This ensures that custom GUCs
      will behave unsurprisingly even when the module loading operation occurs
      within nested subtransactions that have changed the active value.  Since a
      module load could occur as a result of, eg, a PL function call, this is not
      an unlikely scenario.
      41e461d3
  13. Oct 01, 2011
    • Bruce Momjian's avatar
      878b74e0
    • Tom Lane's avatar
      Cache the result of makesign() across calls of gtrgm_penalty(). · 0a5d5a49
      Tom Lane authored
      Since gtrgm_penalty() is usually called many times in a row with the same
      "newval" (to determine which item on an index page newval fits into best),
      the makesign() calculation is repetitious.  It's expensive enough to make
      it worth caching the result, so do so.  On my machine this is good for
      more than a 40% savings in the time needed to build a trigram index on
      /usr/share/dict/words.  This is all per a suggestion of Heikki's.
      
      In passing, make some mostly-cosmetic improvements in the caching logic in
      the other functions in this file that rely on caching info in fn_extra.
      0a5d5a49
  14. Sep 29, 2011
  15. Sep 28, 2011
    • Tom Lane's avatar
      Take sepgsql regression tests out of the regular regression test mechanism. · cc4ff874
      Tom Lane authored
      Because these tests require root privileges, not to mention invasive
      changes to the security configuration of the host system, it's not
      reasonable for them to be invoked by a regular "make check" or "make
      installcheck".  Instead, dike out the Makefile's knowledge of the tests,
      and change chkselinuxenv (now renamed "test_sepgsql") into a script that
      verifies the environment is workable and then runs the tests.  It's
      expected that test_sepgsql will only be run manually.
      
      While at it, do some cleanup in the error checking in the script, and
      do some wordsmithing in the documentation.
      cc4ff874
  16. Sep 27, 2011
  17. Sep 23, 2011
  18. Sep 16, 2011
    • Tom Lane's avatar
      Add FORCE_NOT_NULL support to the file_fdw foreign data wrapper. · 86a3f2d4
      Tom Lane authored
      This is implemented as a per-column boolean option, rather than trying
      to match COPY's convention of a single option listing the column names.
      
      Shigeru Hanada, reviewed by KaiGai Kohei
      86a3f2d4
    • Tom Lane's avatar
      Redesign the plancache mechanism for more flexibility and efficiency. · e6faf910
      Tom Lane authored
      Rewrite plancache.c so that a "cached plan" (which is rather a misnomer
      at this point) can support generation of custom, parameter-value-dependent
      plans, and can make an intelligent choice between using custom plans and
      the traditional generic-plan approach.  The specific choice algorithm
      implemented here can probably be improved in future, but this commit is
      all about getting the mechanism in place, not the policy.
      
      In addition, restructure the API to greatly reduce the amount of extraneous
      data copying needed.  The main compromise needed to make that possible was
      to split the initial creation of a CachedPlanSource into two steps.  It's
      worth noting in particular that SPI_saveplan is now deprecated in favor of
      SPI_keepplan, which accomplishes the same end result with zero data
      copying, and no need to then spend even more cycles throwing away the
      original SPIPlan.  The risk of long-term memory leaks while manipulating
      SPIPlans has also been greatly reduced.  Most of this improvement is based
      on use of the recently-added MemoryContextSetParent primitive.
      e6faf910
  19. Sep 11, 2011
  20. Sep 10, 2011
    • Peter Eisentraut's avatar
      Add missing format attributes · 52ce2058
      Peter Eisentraut authored
      Add __attribute__ decorations for printf format checking to the places that
      were missing them.  Fix the resulting warnings.  Add
      -Wmissing-format-attribute to the standard set of warnings for GCC, so these
      don't happen again.
      
      The warning fixes here are relatively harmless.  The one serious problem
      discovered by this was already committed earlier in
      cf15fb5c.
      52ce2058
  21. Sep 09, 2011
    • Tom Lane's avatar
      Move Timestamp/Interval typedefs and basic macros into datatype/timestamp.h. · a7801b62
      Tom Lane authored
      As per my recent proposal, this refactors things so that these typedefs and
      macros are available in a header that can be included in frontend-ish code.
      I also changed various headers that were undesirably including
      utils/timestamp.h to include datatype/timestamp.h instead.  Unsurprisingly,
      this showed that half the system was getting utils/timestamp.h by way of
      xlog.h.
      
      No actual code changes here, just header refactoring.
      a7801b62
  22. Sep 07, 2011
  23. Sep 04, 2011
    • Tom Lane's avatar
      Clean up the #include mess a little. · 1609797c
      Tom Lane authored
      walsender.h should depend on xlog.h, not vice versa.  (Actually, the
      inclusion was circular until a couple hours ago, which was even sillier;
      but Bruce broke it in the expedient rather than logically correct
      direction.)  Because of that poor decision, plus blind application of
      pgrminclude, we had a situation where half the system was depending on
      xlog.h to include such unrelated stuff as array.h and guc.h.  Clean up
      the header inclusion, and manually revert a lot of what pgrminclude had
      done so things build again.
      
      This episode reinforces my feeling that pgrminclude should not be run
      without adult supervision.  Inclusion changes in header files in particular
      need to be reviewed with great care.  More generally, it'd be good if we
      had a clearer notion of module layering to dictate which headers can sanely
      include which others ... but that's a big task for another day.
      1609797c
  24. Sep 01, 2011
  25. Aug 30, 2011
  26. Aug 27, 2011
Loading