1. 27 Apr, 2011 10 commits
  2. 26 Apr, 2011 6 commits
    • Tom Lane's avatar
      Rephrase some not-supported error messages in pg_hba.conf processing. · 71e70835
      Tom Lane authored
      In a couple of places we said "not supported on this platform" for cases
      that aren't really platform-specific, but could depend on configuration
      options such as --with-openssl.  Use "not supported by this build" instead,
      as that doesn't convey the impression that you can't fix it without moving
      to another OS; that's also more consistent with the wording used for an
      identical error case in guc.c.
      
      No back-patch, as the clarity gain is small enough to not be worth
      burdening translators with back-branch changes.
      71e70835
    • Tom Lane's avatar
      Complain if pg_hba.conf contains "hostssl" but SSL is disabled. · c464a065
      Tom Lane authored
      Most commenters agreed that this is more friendly than silently failing
      to match the line during actual connection attempts.  Also, this will
      prevent corner cases that might arise when trying to handle such a line
      when the SSL code isn't turned on.  An example is that specifying
      clientcert=1 in such a line would formerly result in a completely
      misleading complaint that root.crt wasn't present, as seen in a recent
      report from Marc-Andre Laverdiere.  While we could have instead fixed
      that specific behavior, it seems likely that we'd have a continuing stream
      of such bizarre behaviors if we keep on allowing hostssl lines when SSL is
      disabled.
      
      Back-patch to 8.4, where clientcert was introduced.  Earlier versions don't
      have this specific issue, and the code is enough different to make this
      patch not applicable without more work than it seems worth.
      c464a065
    • Bruce Momjian's avatar
    • Bruce Momjian's avatar
      Now that pg_upgrade uses -w in pg_ctl, remove loop that retried testing · 6c4d2bd9
      Bruce Momjian authored
      the connection;  also restructure the libpq connection code.
      
      This patch also removes the unused variable postmasterPID and fixes a
      libpq structure leak that was in the testing loop.
      6c4d2bd9
    • Bruce Momjian's avatar
      In pg_upgrade, avoid one start/stop of the postmaster; use the -w · 44091442
      Bruce Momjian authored
      (wait) flag for pg_ctl start/stop;  remove the unused "quiet" flag in
      the functions for starting/stopping the postmaster.
      44091442
    • Tom Lane's avatar
      Remove incorrect HINT for use of ALTER FOREIGN TABLE on the wrong relkind. · 6dab96ab
      Tom Lane authored
      Per discussion, removing the hint seems better than correcting it because
      the adjacent analogous cases in RenameRelation don't have any hints, and
      nobody seems to have missed 'em.
      
      Shigeru Hanada
      6dab96ab
  3. 25 Apr, 2011 14 commits
  4. 24 Apr, 2011 3 commits
    • Peter Eisentraut's avatar
      Normalize whitespace in the arguments of <indexterm> · 94126062
      Peter Eisentraut authored
      Strip leading and trailing whitespace and replace interior whitespace
      by a single space.  This avoids problems with the index generator
      producing duplicate index entries for terms that differ only in
      whitespace.
      
      Commit dca30da3 actually fixed all the
      indexterm elements that would cause this problem at the moment, but in
      case it sneaks in again, we're set.
      94126062
    • Tom Lane's avatar
      Improve cost estimation for aggregates and window functions. · e6a30a8c
      Tom Lane authored
      The previous coding failed to account properly for the costs of evaluating
      the input expressions of aggregates and window functions, as seen in a
      recent gripe from Claudio Freire.  (I said at the time that it wasn't
      counting these costs at all; but on closer inspection, it was effectively
      charging these costs once per output tuple.  That is completely wrong for
      aggregates, and not exactly right for window functions either.)
      
      There was also a hard-wired assumption that aggregates and window functions
      had procost 1.0, which is now fixed to respect the actual cataloged costs.
      
      The costing of WindowAgg is still pretty bogus, since it doesn't try to
      estimate the effects of spilling data to disk, but that seems like a
      separate issue.
      e6a30a8c
    • Bruce Momjian's avatar
      In pg_upgrade, only compile copy_file() on non-Win32 systems. · f6322b31
      Bruce Momjian authored
      Per report from Andrew Dunstan.
      f6322b31
  5. 23 Apr, 2011 7 commits
    • Tom Lane's avatar
      Improve findoidjoins to cover more cases. · 795c382e
      Tom Lane authored
      Teach the program and script to deal with OID-array referencing columns,
      which we now have several of.  Also, modify the recommended usage process
      to specify that the program should be run against the regression database
      rather than template1.  This lets it find numerous joins that cannot be
      found in template1 because the relevant catalogs are entirely empty.
      
      Together these changes add seventeen formerly-missed cases to the oidjoins
      regression test.
      795c382e
    • Andrew Dunstan's avatar
      Silence a few compiler warnings from gcc on MinGW. · d98711df
      Andrew Dunstan authored
      Most of these cast DWORD to int or unsigned int for printf type handling.
      This is safe even on 64 bit architectures because a DWORD is always 32 bits.
      
      In one case a variable is initialised to keep the compiler happy.
      d98711df
    • Tom Lane's avatar
    • Tom Lane's avatar
      Hash indexes had better pass the index collation to support functions, too. · a0b75a41
      Tom Lane authored
      Per experimentation with contrib/citext, whose hash function assumes that
      it'll be passed a collation.
      a0b75a41
    • Tom Lane's avatar
      Adjust comments about collate.linux.utf8 regression test. · 1abd146d
      Tom Lane authored
      This test should now work in any database with UTF8 encoding, regardless
      of the database's default locale.  The former restriction was really
      "doesn't work if default locale is C", and that was because of not handling
      mbstowcs/wcstombs correctly.
      1abd146d
    • Tom Lane's avatar
      Fix char2wchar/wchar2char to support collations properly. · 2ab0796d
      Tom Lane authored
      These functions should take a pg_locale_t, not a collation OID, and should
      call mbstowcs_l/wcstombs_l where available.  Where those functions are not
      available, temporarily select the correct locale with uselocale().
      
      This change removes the bogus assumption that all locales selectable in
      a given database have the same wide-character conversion method; in
      particular, the collate.linux.utf8 regression test now passes with
      LC_CTYPE=C, so long as the database encoding is UTF8.
      
      I decided to move the char2wchar/wchar2char functions out of mbutils.c and
      into pg_locale.c, because they work on wchar_t not pg_wchar_t and thus
      don't really belong with the mbutils.c functions.  Keeping them where they
      were would have required importing pg_locale_t into pg_wchar.h somehow,
      which did not seem like a good plan.
      2ab0796d
    • Tom Lane's avatar
      Fix contrib/btree_gist to handle collations properly. · bb850306
      Tom Lane authored
      Make use of the collation attached to the index column, instead of
      hard-wiring DEFAULT_COLLATION_OID.  (Note: in theory this could require
      reindexing btree_gist indexes on textual columns, but I rather doubt anyone
      has one with a non-default declared collation as yet.)
      bb850306