1. 07 Apr, 2017 2 commits
    • Peter Eisentraut's avatar
      Remove use of Jade and DSSSL · 510074f9
      Peter Eisentraut authored
      All documentation is now built using XSLT.  Remove all references to
      Jade, DSSSL, also JadeTex and some other outdated tooling.
      
      For chunked HTML builds, this changes nothing, but removes the
      transitional "oldhtml" target.  The single-page HTML build is ported
      over to XSLT.  For PDF builds, this removes the JadeTex builds and moves
      the FOP builds in their place.
      510074f9
    • Tom Lane's avatar
      Clean up after insufficiently-researched optimization of tuple conversions. · 3f902354
      Tom Lane authored
      tupconvert.c's functions formerly considered that an explicit tuple
      conversion was necessary if the input and output tupdescs contained
      different type OIDs.  The point of that was to make sure that a composite
      datum resulting from the conversion would contain the destination rowtype
      OID in its composite-datum header.  However, commit 3838074f entirely
      misunderstood what that check was for, thinking that it had something to do
      with presence or absence of an OID column within the tuple.  Removal of the
      check broke the no-op conversion path in ExecEvalConvertRowtype, as
      reported by Ashutosh Bapat.
      
      It turns out that of the dozen or so call sites for tupconvert.c functions,
      ExecEvalConvertRowtype is the only one that cares about the composite-datum
      header fields in the output tuple.  In all the rest, we'd much rather avoid
      an unnecessary conversion whenever the tuples are physically compatible.
      Moreover, the comments in tupconvert.c only promise physical compatibility
      not a metadata match.  So, let's accept the removal of the guarantee about
      the output tuple's rowtype marking, recognizing that this is a API change
      that could conceivably break third-party callers of tupconvert.c.  (So,
      let's remember to mention it in the v10 release notes.)
      
      However, commit 3838074f did have a bit of a point here, in that two
      tuples mustn't be considered physically compatible if one has HEAP_HASOID
      set and the other doesn't.  (Some of the callers of tupconvert.c might not
      really care about that, but we can't assume it in general.)  The previous
      check accidentally covered that issue, because no RECORD types ever have
      OIDs, while if two tupdescs have the same named composite type OID then,
      a fortiori, they have the same tdhasoid setting.  If we're removing the
      type OID match check then we'd better include tdhasoid match as part of
      the physical compatibility check.
      
      Without that hack in tupconvert.c, we need ExecEvalConvertRowtype to take
      responsibility for inserting the correct rowtype OID label whenever
      tupconvert.c decides it need not do anything.  This is easily done with
      heap_copy_tuple_as_datum, which will be considerably faster than a tuple
      disassembly and reassembly anyway; so from a performance standpoint this
      change is a win all around compared to what happened in earlier branches.
      It just means a couple more lines of code in ExecEvalConvertRowtype.
      
      Ashutosh Bapat and Tom Lane
      
      Discussion: https://postgr.es/m/CAFjFpRfvHABV6+oVvGcshF8rHn+1LfRUhj7Jz1CDZ4gPUwehBg@mail.gmail.com
      3f902354
  2. 06 Apr, 2017 25 commits
  3. 05 Apr, 2017 12 commits
  4. 04 Apr, 2017 1 commit
    • Kevin Grittner's avatar
      Follow-on cleanup for the transition table patch. · 5ebeb579
      Kevin Grittner authored
      Commit 59702716 added transition table support to PL/pgsql so that
      SQL queries in trigger functions could access those transient
      tables.  In order to provide the same level of support for PL/perl,
      PL/python and PL/tcl, refactor the relevant code into a new
      function SPI_register_trigger_data.  Call the new function in the
      trigger handler of all four PLs, and document it as a public SPI
      function so that authors of out-of-tree PLs can do the same.
      
      Also get rid of a second QueryEnvironment object that was
      maintained by PL/pgsql.  That was previously used to deal with
      cursors, but the same approach wasn't appropriate for PLs that are
      less tangled up with core code.  Instead, have SPI_cursor_open
      install the connection's current QueryEnvironment, as already
      happens for SPI_execute_plan.
      
      While in the docs, remove the note that transition tables were only
      supported in C and PL/pgSQL triggers, and correct some ommissions.
      
      Thomas Munro with some work by Kevin Grittner (mostly docs)
      5ebeb579