1. 29 Apr, 2018 3 commits
    • Tom Lane's avatar
      Update time zone data files to tzdata release 2018d. · df629586
      Tom Lane authored
      DST law changes in Palestine and Antarctica (Casey Station).  Historical
      corrections for Portugal and its colonies, as well as Enderbury, Jamaica,
      Turks & Caicos Islands, and Uruguay.
      df629586
    • Tom Lane's avatar
      Avoid wrong results for power() with NaN input on some platforms. · 61b200e2
      Tom Lane authored
      Per spec, the result of power() should be NaN if either input is NaN.
      It appears that on some versions of Windows, the libc function does
      return NaN, but it also sets errno = EDOM, confusing our code that
      attempts to work around shortcomings of other platforms.  Hence, add
      guard tests to avoid substituting a wrong result for the right one.
      
      It's been like this for a long time (and the odd behavior only appears
      in older MSVC releases, too) so back-patch to all supported branches.
      
      Dang Minh Huong, reviewed by David Rowley
      
      Discussion: https://postgr.es/m/75DB81BEEA95B445AE6D576A0A5C9E936A73E741@BPXM05GP.gisp.nec.co.jp
      61b200e2
    • Tom Lane's avatar
      Cosmetic improvement: use BKI_DEFAULT and BKI_LOOKUP in pg_language. · 85475afd
      Tom Lane authored
      The point of this is not really to remove redundancy in pg_language.dat;
      with only three entries, it's hardly worth it.  Rather, it is to get
      to a point where there are exactly zero hard-coded numeric pg_proc OID
      references in the catalog .dat files.  The lanvalidator column was the
      only remaining location of such references, and it seems like a good
      thing for future-proofing reasons to make it not be a special case.
      
      There are still a few places in the .dat files with numeric OID references
      to other catalogs, but after review I don't see any that seem worth
      changing at present.  In each case there are just too few entries to make
      it worth the trouble to create lookup infrastructure.
      
      This doesn't change the emitted postgres.bki file, so no catversion bump.
      85475afd
  2. 28 Apr, 2018 8 commits
  3. 27 Apr, 2018 5 commits
  4. 26 Apr, 2018 7 commits
  5. 25 Apr, 2018 9 commits
  6. 24 Apr, 2018 1 commit
  7. 23 Apr, 2018 7 commits
    • Alvaro Herrera's avatar
      Add GUC enable_partition_pruning · 055fb8d3
      Alvaro Herrera authored
      This controls both plan-time and execution-time new-style partition
      pruning.  While finer-grain control is possible (maybe using an enum GUC
      instead of boolean), there doesn't seem to be much need for that.
      
      This new parameter controls partition pruning for all queries:
      trivially, SELECT queries that affect partitioned tables are naturally
      under its control since they are using the new technology.  However,
      while UPDATE/DELETE queries do not use the new code, we make the new GUC
      control their behavior also (stealing control from
      constraint_exclusion), because it is more natural, and it leads to a
      more natural transition to the future in which those queries will also
      use the new pruning code.
      
      Constraint exclusion still controls pruning for regular inheritance
      situations (those not involving partitioned tables).
      
      Author: David Rowley
      Review: Amit Langote, Ashutosh Bapat, Justin Pryzby, David G. Johnston
      Discussion: https://postgr.es/m/CAKJS1f_0HwsxJG9m+nzU+CizxSdGtfe6iF_ykPYBiYft302DCw@mail.gmail.com
      055fb8d3
    • Tom Lane's avatar
      Fix handling of partition bounds for boolean partitioning columns. · 4df58f7e
      Tom Lane authored
      Previously, you could partition by a boolean column as long as you
      spelled the bound values as string literals, for instance FOR VALUES
      IN ('t').  The trouble with this is that ruleutils.c printed that as
      FOR VALUES IN (TRUE), which is reasonable syntax but wasn't accepted by
      the grammar.  That results in dump-and-reload failures for such cases.
      
      Apply a minimal fix that just causes TRUE and FALSE to be converted to
      strings 'true' and 'false'.  This is pretty grotty, but it's too late for
      a more principled fix in v11 (to say nothing of v10).  We should revisit
      the whole issue of how partition bound values are parsed for v12.
      
      Amit Langote
      
      Discussion: https://postgr.es/m/e05c5162-1103-7e37-d1ab-6de3e0afaf70@lab.ntt.co.jp
      4df58f7e
    • Peter Eisentraut's avatar
      Fix typo in logical truncate replication · df044026
      Peter Eisentraut authored
      This could result in some misbehavior in a cascading replication setup.
      df044026
    • Peter Eisentraut's avatar
      Make Emacs settings match perltidy configuration · 56fb890a
      Peter Eisentraut authored
      Set Emacs's perl-continued-statement-offset to match perltidy's
      --continuation-indentation, which is 2 (not overridden in PostgreSQL's
      profile) rather than the 4 that Emacs uses by default.
      56fb890a
    • Alvaro Herrera's avatar
      Add missing pstrdup · bc972072
      Alvaro Herrera authored
      Lifetime of the input string is not right, so create a separate copy.
      
      Author: Amit Langote
      Discussion: https://postgr.es/m/a2773420-50d1-0a42-3396-fe42b0921134@lab.ntt.co.jp
      bc972072
    • Alvaro Herrera's avatar
      Remove useless default clause in switch · dfce1f9e
      Alvaro Herrera authored
      The switch covers all values of the enum driver variable, so having a
      default: clause is useless, even if it's only to do Assert(false).
      dfce1f9e
    • Teodor Sigaev's avatar
      Make bms_prev_member work correctly with a 64 bit bitmapword · a5ab8928
      Teodor Sigaev authored
      5c067521 erroneously had coded bms_prev_member assuming that a bitmapword
      would always hold 32 bits and started it's search on what it thought was the
      highest 8-bits of the word.  This was not the case if bitmapwords were 64
      bits.
      
      In passing add a test to exercise this function a little. Previously there was
      no coverage at all.
      
      David Rowly
      a5ab8928