1. 15 Apr, 2011 3 commits
  2. 14 Apr, 2011 4 commits
    • Tom Lane's avatar
    • Robert Haas's avatar
      Advise Debian/Ubuntu users to use openjade1.3. · 07e58cbe
      Robert Haas authored
      The latest openjade packages for Ubuntu 10.10 seg fault when building
      our documentation.
      
      Josh Berkus
      07e58cbe
    • Robert Haas's avatar
      Remove obsolete comment. · 0c80b57d
      Robert Haas authored
      The lock level for adding a parent table is now ShareUpdateExclusiveLock;
      see commit fbcf4b92.  This comment didn't
      get updated to match, but it doesn't seem important to mention this detail
      here, so rather than updating it now, just take it out.
      0c80b57d
    • Robert Haas's avatar
      Fix toast table creation. · 39a68e5c
      Robert Haas authored
      Instead of using slightly-too-clever heuristics to decide when we must
      create a TOAST table, just check whether one is needed every time the
      table is altered.  Checking whether a toast table is needed is cheap
      enough that we needn't worry about doing it on every ALTER TABLE command,
      and the previous coding is apparently prone to accidental breakage:
      commit 04e17bae broken ALTER TABLE ..
      SET STORAGE, which moved some actions from AT_PASS_COL_ATTRS to
      AT_PASS_MISC, and commit 6c572399 broke
      ALTER TABLE .. ADD COLUMN by changing the way that adding columns
      recurses into child tables.
      
      Noah Misch, with one comment change by me
      39a68e5c
  3. 13 Apr, 2011 7 commits
  4. 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
  5. 11 Apr, 2011 4 commits
  6. 10 Apr, 2011 7 commits
  7. 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
  8. 08 Apr, 2011 4 commits
    • Tom Lane's avatar
      Clean up minor collation issues in indxpath.c. · 69f1d5fe
      Tom Lane authored
      Get rid of bogus collation test in match_special_index_operator (even for
      ILIKE, the pattern match operator's collation doesn't matter here, and even
      if it did the test was testing the wrong thing).
      Fix broken looping logic in expand_indexqual_rowcompare.
      Add collation check in match_clause_to_ordering_op.
      Make naming and argument ordering more consistent; improve comments.
      69f1d5fe
    • Tom Lane's avatar
      Fix make_greater_string to not have an undocumented collation assumption. · 466dac86
      Tom Lane authored
      The previous coding worked only if ltproc->fn_collation was always either
      DEFAULT_COLLATION_OID or a C-compatible locale.  While that's true at the
      moment, it wasn't documented (and in fact wasn't true when this code was
      committed...).  But it only takes a couple more lines to make its internal
      caching behavior locale-aware, so let's do that.
      466dac86
    • Robert Haas's avatar
      Truncate the predicate lock SLRU to empty, instead of almost empty. · cdcdfca4
      Robert Haas authored
      Otherwise, the SLRU machinery can get confused and think that the SLRU
      has wrapped around.  Along the way, regardless of whether we're
      truncating all of the SLRU or just some of it, flush pages after
      truncating, rather than before.
      
      Kevin Grittner
      cdcdfca4
    • Tom Lane's avatar
      Tweak collation setup for GIN index comparison functions. · 1766a5b6
      Tom Lane authored
      Honor index column's collation spec if there is one, don't go to the
      expense of calling get_typcollation when we can reasonably assume that
      all GIN storage types will use default collation, and be sure to set
      a collation for the comparePartialFn too.
      1766a5b6