1. 09 Apr, 2011 6 commits
    • Peter Eisentraut's avatar
      Add collation support on Windows (MSVC build) · 11745364
      Peter Eisentraut authored
      There is not yet support in initdb to populate the pg_collation
      catalog, but if that is done manually, the rest should work.
      11745364
    • Tom Lane's avatar
      Fix ILIKE to honor collation when working in single-byte encodings. · 00f11f41
      Tom Lane authored
      The original collation patch only fixed the multi-byte code path.
      This change also ensures that ILIKE's idea of the case-folding rules
      is exactly the same as str_tolower's.
      00f11f41
    • Tom Lane's avatar
      Remove collate.linux.utf8.sql's assumptions about ".utf8" in locale names. · f89e4dfa
      Tom Lane authored
      Tweak the test so that it does not depend on the platform using ".utf8" as
      the extension signifying that a locale uses UTF8 encoding.  For the most
      part this just requires using the abbreviated collation names "en_US" etc,
      though I had to work a bit harder on the collation creation tests.
      
      This opens the door to using the test on platforms that spell locales
      differently, for example ".utf-8" or ".UTF-8".  Also, the test is now
      somewhat useful with server encodings other than UTF8; though depending on
      which encoding is selected, different subsets of it will fail for lack of
      character set support.
      f89e4dfa
    • Tom Lane's avatar
      Adjust collation determination rules as per discussion. · a19002d4
      Tom Lane authored
      Remove crude hack that tried to propagate collation through a
      function-returning-record, ie, from the function's arguments to individual
      fields selected from its result record.  That is just plain inconsistent,
      because the function result is composite and cannot have a collation;
      and there's no hope of making this kind of action-at-a-distance work
      consistently.  Adjust regression test cases that expected this to happen.
      
      Meanwhile, the behavior of casting to a domain with a declared collation
      stays the same as it was, since that seemed to be the consensus.
      a19002d4
    • Tom Lane's avatar
      Don't show unusable collations in psql's \dO command. · 7c76906b
      Tom Lane authored
      "Unusable" collations are those not matching the current database's
      encoding.  The former behavior inconsistently showed such collations
      some of the time, depending on the details of the pattern argument.
      7c76906b
    • Andrew Dunstan's avatar
      fe1438da
  2. 08 Apr, 2011 14 commits
  3. 07 Apr, 2011 8 commits
    • Robert Haas's avatar
      Tweaks for SSI out-of-shared memory behavior. · 56c7140c
      Robert Haas authored
      If we call hash_search() with HASH_ENTER, it will bail out rather than
      return NULL, so it's redundant to check for NULL again in the caller.
      Thus, in cases where we believe it's impossible for the hash table to run
      out of slots anyway, we can simplify the code slightly.
      
      On the flip side, in cases where it's theoretically possible to run out of
      space, we don't want to rely on dynahash.c to throw an error; instead,
      we pass HASH_ENTER_NULL and throw the error ourselves if a NULL comes
      back, so that we can provide a more descriptive error message.
      
      Kevin Grittner
      56c7140c
    • Tom Lane's avatar
      Modernize dlopen interface code for FreeBSD and OpenBSD. · 73d9a908
      Tom Lane authored
      Remove the hard-wired assumption that __mips__ (and only __mips__) lacks
      dlopen in FreeBSD and OpenBSD.  This assumption is outdated at least for
      OpenBSD, as per report from an anonymous 9.1 tester.  We can perfectly well
      use HAVE_DLOPEN instead to decide which code to use.
      
      Some other cosmetic adjustments to make freebsd.c, netbsd.c, and openbsd.c
      exactly alike.
      73d9a908
    • Peter Eisentraut's avatar
      Allow pg_upgrade with PGCLIENTENCODING set · 1eb2231f
      Peter Eisentraut authored
      This used to work, but since PGCLIENTENCODING is now a connection
      option variable, pg_upgrade would prevent it.
      1eb2231f
    • Tom Lane's avatar
      Fix SortTocFromFile() to cope with lines that are too long for its buffer. · 1471a147
      Tom Lane authored
      The original coding supposed that a dump TOC file could never contain lines
      longer than 1K.  The folly of that was exposed by a recent report from
      Per-Olov Esgard.  We only really need to see the first dozen or two bytes
      of each line, since we're just trying to read off the numeric ID at the
      start of the line; so there's no need for a particularly huge buffer.
      What there is a need for is logic to not process continuation bufferloads.
      
      Back-patch to all supported branches, since it's always been like this.
      1471a147
    • Bruce Momjian's avatar
      Preserve pg_largeobject_metadata.relfrozenxid in pg_upgrade. · 82a4f370
      Bruce Momjian authored
      This is needed only in 9.1 because only 9.0 had this and no one is
      upgrading from a 9.0 beta to 9.0 anymore.  We basically don't backpatch
      9.0 beta fixes at this point.
      82a4f370
    • Bruce Momjian's avatar
      e69d3215
    • Tom Lane's avatar
      Fix collations when we call transformWhereClause from outside the parser. · d8d42989
      Tom Lane authored
      Previous patches took care of assorted places that call transformExpr from
      outside the main parser, but I overlooked the fact that some places use
      transformWhereClause as a shortcut for transformExpr + coerce_to_boolean.
      In particular this broke collation-sensitive index WHERE clauses, as per
      report from Thom Brown.  Trigger WHEN and rule WHERE clauses too.
      
      I'm not forcing initdb for this fix, but any affected indexes, triggers,
      or rules will need to be dropped and recreated.
      d8d42989
    • Tom Lane's avatar
      Revise the API for GUC variable assign hooks. · 2594cf0e
      Tom Lane authored
      The previous functions of assign hooks are now split between check hooks
      and assign hooks, where the former can fail but the latter shouldn't.
      Aside from being conceptually clearer, this approach exposes the
      "canonicalized" form of the variable value to guc.c without having to do
      an actual assignment.  And that lets us fix the problem recently noted by
      Bernd Helmle that the auto-tune patch for wal_buffers resulted in bogus
      log messages about "parameter "wal_buffers" cannot be changed without
      restarting the server".  There may be some speed advantage too, because
      this design lets hook functions avoid re-parsing variable values when
      restoring a previous state after a rollback (they can store a pre-parsed
      representation of the value instead).  This patch also resolves a
      longstanding annoyance about custom error messages from variable assign
      hooks: they should modify, not appear separately from, guc.c's own message
      about "invalid parameter value".
      2594cf0e
  4. 06 Apr, 2011 3 commits
  5. 05 Apr, 2011 5 commits
  6. 04 Apr, 2011 4 commits