1. 03 Mar, 2018 3 commits
  2. 02 Mar, 2018 11 commits
  3. 01 Mar, 2018 11 commits
  4. 28 Feb, 2018 10 commits
  5. 27 Feb, 2018 5 commits
    • Tom Lane's avatar
      Fix up ecpg's configuration so it handles "long long int" in MSVC builds. · 51057fea
      Tom Lane authored
      Although configure-based builds correctly define HAVE_LONG_LONG_INT when
      appropriate (in both pg_config.h and ecpg_config.h), builds using the MSVC
      scripts failed to do so.  This currently has no impact on the backend,
      since it uses that symbol nowhere; but it does prevent ecpg from
      supporting "long long int".  Fix that.
      
      Also, adjust Solution.pm so that in the constructed ecpg_config.h file,
      the "#if (_MSC_VER > 1200)" covers only the LONG_LONG_INT-related
      #defines, not the whole file.  AFAICS this was a thinko on somebody's
      part: ENABLE_THREAD_SAFETY should always be defined in Windows builds,
      and in branches using USE_INTEGER_DATETIMES, the setting of that shouldn't
      depend on the compiler version either.  If I'm wrong, I imagine the
      buildfarm will say so.
      
      Per bug #15080 from Jonathan Allen; issue diagnosed by Michael Meskes
      and Andrew Gierth.  Back-patch to all supported branches.
      
      Discussion: https://postgr.es/m/151935568942.1461.14623890240535309745@wrigleys.postgresql.org
      51057fea
    • Tom Lane's avatar
      Use the correct tuplestore read pointer in a NamedTuplestoreScan. · e98a4de7
      Tom Lane authored
      Tom Kazimiers reported that transition tables don't work correctly when
      they are scanned by more than one executor node.  That's because commit
      18ce3a4a allocated separate read pointers for each executor node, as it
      must, but failed to make them active at the appropriate times.  Repair.
      
      Thomas Munro
      
      Discussion: https://postgr.es/m/20180224034748.bixarv6632vbxgeb%40dewberry.localdomain
      e98a4de7
    • Tom Lane's avatar
      Revert renaming of int44in/int44out. · c40e20a8
      Tom Lane authored
      This seemed like a good idea in commit be42eb9d, but it causes more
      trouble than it's worth for cross-branch upgrade testing.
      
      Discussion: https://postgr.es/m/11927.1519756619@sss.pgh.pa.us
      c40e20a8
    • Robert Haas's avatar
      doc: Fix grammar. · 6614aaa6
      Robert Haas authored
      Michael Paquier
      
      Discussion: http://postgr.es/m/20180209135327.GC29003@paquier.xyz
      6614aaa6
    • Tom Lane's avatar
      Prevent dangling-pointer access when update trigger returns old tuple. · 25b69256
      Tom Lane authored
      A before-update row trigger may choose to return the "new" or "old" tuple
      unmodified.  ExecBRUpdateTriggers failed to consider the second
      possibility, and would proceed to free the "old" tuple even if it was the
      one returned, leading to subsequent access to already-deallocated memory.
      In debug builds this reliably leads to an "invalid memory alloc request
      size" failure; in production builds it might accidentally work, but data
      corruption is also possible.
      
      This is a very old bug.  There are probably a couple of reasons it hasn't
      been noticed up to now.  It would be more usual to return NULL if one
      wanted to suppress the update action; returning "old" is significantly less
      efficient since the update will occur anyway.  Also, none of the standard
      PLs would ever cause this because they all returned freshly-manufactured
      tuples even if they were just copying "old".  But commit 4b93f579 changed
      that for plpgsql, making it possible to see the bug with a plpgsql trigger.
      Still, this is certainly legal behavior for a trigger function, so it's
      ExecBRUpdateTriggers's fault not plpgsql's.
      
      It seems worth creating a test case that exercises returning "old" directly
      with a C-language trigger; testing this through plpgsql seems unreliable
      because its behavior might change again.
      
      Report and fix by Rushabh Lathia; regression test case by me.
      Back-patch to all supported branches.
      
      Discussion: https://postgr.es/m/CAGPqQf1P4pjiNPrMof=P_16E-DFjt457j+nH2ex3=nBTew7tXw@mail.gmail.com
      25b69256