1. 02 Jun, 2019 4 commits
    • Tom Lane's avatar
      Clean up PL/Perl's handling of the _() macro. · 032627ee
      Tom Lane authored
      Perl likes to redefine the _() macro:
      
      #ifdef CAN_PROTOTYPE
      #define	_(args) args
      #else ...
      
      There was lots not to like about the way we dealt with this before:
      
      1. Instead of taking care of the conflict centrally in plperl.h, we
      expected every one of its ever-growing number of includers to do so.
      This is duplicative and error-prone in itself, plus it means that
      plperl.h fails to meet the expectation of being compilable standalone,
      resulting in macro-redefinition warnings in cpluspluscheck.
      
      2. We left _() with its Perl definition, meaning that if someone tried
      to use it in any Perl-related extension, it would silently fail to
      provide run-time translation.  I don't see any live bugs of this ilk,
      but it's clearly a hard-to-notice bug waiting to happen.
      
      So fix that by centralizing the cleanup logic, making it match what
      we're already doing for other macro conflicts with Perl.  Since we only
      expect plperl.h to be included by extensions not core code, we should
      redefine _() as dgettext() not gettext().
      032627ee
    • Tom Lane's avatar
      worker_spi needs a .gitignore file now. · 135063e6
      Tom Lane authored
      135063e6
    • Tom Lane's avatar
      Un-break ecpg tests for Windows. · 10a53cae
      Tom Lane authored
      Declaring a function "inline" still doesn't work with Windows compilers
      (C99? what's that?), unless the macro provided by pg_config.h is
      in-scope, which it is not in our ECPG test programs.  So the workaround
      I tried to use in commit 7640f931 doesn't work for Windows.  Revert
      the change in printf_hack.h, and instead just blacklist that file
      in cpluspluscheck --- since it's a not-installed test file, we don't
      really need to verify its C++ cleanliness anyway.
      10a53cae
    • Alvaro Herrera's avatar
      Increase test coverage for worker_spi by ∞% · 4b3f1dd7
      Alvaro Herrera authored
      This test module was not getting invoked, other than at compile time,
      limiting its usefulness -- and keeping its coverage at 0%.  Add a
      minimal regression test to ensure it runs on make check-world; this
      makes it 92% covered (line-wise), which seems sufficient.
      
      Author: Álvaro Herrera <alvherre@alvh.no-ip.org>
      Reviewed-by: default avatarTom Lane <tgl@sss.pgh.pa.us>
      Discussion: https://postgr.es/m/20190529193256.GA17603@alvherre.pgsql
      4b3f1dd7
  2. 01 Jun, 2019 1 commit
  3. 31 May, 2019 9 commits
  4. 30 May, 2019 3 commits
  5. 29 May, 2019 3 commits
  6. 28 May, 2019 7 commits
  7. 27 May, 2019 1 commit
  8. 26 May, 2019 4 commits
  9. 25 May, 2019 1 commit
  10. 24 May, 2019 3 commits
  11. 23 May, 2019 4 commits
    • Andres Freund's avatar
      tableam: Rename wrapper functions to match callback names. · 73b8c3bd
      Andres Freund authored
      Some of the wrapper functions didn't match the callback names. Many of
      them due to staying "consistent" with historic naming of the wrapped
      functionality. We decided that for most cases it's more important to
      be for tableam to be consistent going forward, than with the past.
      
      The one exception is beginscan/endscan/...  because it'd have looked
      odd to have systable_beginscan/endscan/... with a different naming
      scheme, and changing the systable_* APIs would have caused way too
      much churn (including breaking a lot of external users).
      
      Author: Ashwin Agrawal, with some small additions by Andres Freund
      Reviewed-By: Andres Freund
      Discussion: https://postgr.es/m/CALfoeiugyrXZfX7n0ORCa4L-m834dzmaE8eFdbNR6PMpetU4Ww@mail.gmail.com
      73b8c3bd
    • Michael Paquier's avatar
      Fix table dump in pg_dump[all] with backends older than 9.5 · 54487d15
      Michael Paquier authored
      The access method name "amname" can be dumped as of 3b925e90, but
      queries for backends older than 9.5 forgot to map it to a dummy NULL
      value, causing the column to not be mapped to a number.  As a result,
      pg_dump was throwing some spurious errors in its stderr output coming
      from libpq:
      pg_dump: column number -1 is out of range 0..36
      
      Fix this issue by adding a mapping of "amname" to NULL to all the older
      queries.
      
      Discussion: https://postgr.es/m/20190522083038.GA16837@paquier.xyz
      Author: Michael Paquier
      Reviewed-by: Dmitry Dolgov, Andres Freund, Tom Lane
      54487d15
    • Andres Freund's avatar
      pg_upgrade: Make test.sh's installcheck use to-be-upgraded version's bindir. · f916221d
      Andres Freund authored
      On master (after 700538) the old version's installed psql was used -
      even when the old version might not actually be installed / might be
      installed into a temporary directory. As commonly the case when just
      executing make check for pg_upgrade, as $oldbindir is just the current
      version's $bindir.
      
      In the back branches, with --install specified, psql from the new
      version's temporary installation was used, without --install (e.g for
      NO_TEMP_INSTALL, cf 47b3c266), the new version's installed psql was
      used (which might or might not exist).
      
      Author: Andres Freund
      Discussion: https://postgr.es/m/20190522175150.c26f4jkqytahajdg@alap3.anarazel.de
      f916221d
    • Andrew Gierth's avatar
      Fix array size allocation for HashAggregate hash keys. · 44e95b57
      Andrew Gierth authored
      When there were duplicate columns in the hash key list, the array
      sizes could be miscomputed, resulting in access off the end of the
      array. Adjust the computation to ensure the array is always large
      enough.
      
      (I considered whether the duplicates could be removed in planning, but
      I can't rule out the possibility that duplicate columns might have
      different hash functions assigned. Simpler to just make sure it works
      at execution time regardless.)
      
      Bug apparently introduced in fc4b3dea as part of narrowing down the
      tuples stored in the hashtable. Reported by Colm McHugh of Salesforce,
      though I didn't use their patch. Backpatch back to version 10 where
      the bug was introduced.
      
      Discussion: https://postgr.es/m/CAFeeJoKKu0u+A_A9R9316djW-YW3-+Gtgvy3ju655qRHR3jtdA@mail.gmail.com
      44e95b57