1. 13 Apr, 2011 7 commits
  2. 12 Apr, 2011 4 commits
    • Tom Lane's avatar
      Pass collations to functions in FunctionCallInfoData, not FmgrInfo. · d64713df
      Tom Lane authored
      Since collation is effectively an argument, not a property of the function,
      FmgrInfo is really the wrong place for it; and this becomes critical in
      cases where a cached FmgrInfo is used for varying purposes that might need
      different collation settings.  Fix by passing it in FunctionCallInfoData
      instead.  In particular this allows a clean fix for bug #5970 (record_cmp
      not working).  This requires touching a bit more code than the original
      method, but nobody ever thought that collations would not be an invasive
      patch...
      d64713df
    • Tom Lane's avatar
      Suppress compiler warnings about "value computed is not used". · 88543ecf
      Tom Lane authored
      The recent patch to remove gcc 4.6 warnings created some new ones, at
      least on my rather old gcc version.  Try to make everybody happy by
      casting to "void" when we just want to discard the result.
      88543ecf
    • Tom Lane's avatar
      Be more wary of missing statistics in eqjoinsel_semi(). · 3f5d2fe3
      Tom Lane authored
      In particular, if we don't have real ndistinct estimates for both sides,
      fall back to assuming that half of the left-hand rows have join partners.
      This is what was done in 8.2 and 8.3 (cf nulltestsel() in those versions).
      It's pretty stupid but it won't lead us to think that an antijoin produces
      no rows out, as seen in recent example from Uwe Schroeder.
      3f5d2fe3
    • Tom Lane's avatar
      Fix RI_Initial_Check to use a COLLATE clause when needed in its query. · 921b9936
      Tom Lane authored
      If the referencing and referenced columns have different collations,
      the parser will be unable to resolve which collation to use unless it's
      helped out in this way.  The effects are sometimes masked, if we end up
      using a non-collation-sensitive plan; but if we do use a mergejoin
      we'll see a failure, as recently noted by Robert Haas.
      
      The SQL spec states that the referenced column's collation should be used
      to resolve RI checks, so that's what we do.  Note however that we currently
      don't append a COLLATE clause when writing a query that examines only the
      referencing column.  If we ever support collations that have varying
      notions of equality, that will have to be changed.  For the moment, though,
      it's preferable to leave it off so that we can use a normal index on the
      referencing column.
      921b9936
  3. 11 Apr, 2011 4 commits
  4. 10 Apr, 2011 7 commits
  5. 09 Apr, 2011 7 commits
    • Tom Lane's avatar
      Clean up overly complex code for issuing some related error messages. · 9a8b7314
      Tom Lane authored
      The original version was unreadable, and not mechanically checkable
      either.
      9a8b7314
    • 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
  6. 08 Apr, 2011 11 commits