BUG #14985: ExecCopySlotTuple not set "type id" and "type mod" whenfrom minial tuple" - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #14985: ExecCopySlotTuple not set "type id" and "type mod" whenfrom minial tuple"
Date
Msg-id 20171220100540.25742.92719@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #14985: ExecCopySlotTuple not set "type id" and "type mod"when from minial tuple"  (Andres Freund <andres@anarazel.de>)
Re: BUG #14985: ExecCopySlotTuple not set "type id" and "type mod" when from minial tuple"  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      14985
Logged by:          bucoo hsiao
Email address:      bucoo@sohu.com
PostgreSQL version: 10.1
Operating system:   all
Description:

HeapTuple
ExecCopySlotTuple(TupleTableSlot *slot)
{
    /*
     * sanity checks
     */
    Assert(slot != NULL);
    Assert(!slot->tts_isempty);

    /*
     * If we have a physical tuple (either format) then just copy it.
     */
    if (TTS_HAS_PHYSICAL_TUPLE(slot))
        return heap_copytuple(slot->tts_tuple);
    if (slot->tts_mintuple)
        return heap_tuple_from_minimal_tuple(slot->tts_mintuple);
/* should be:
        if (slot->tts_mintuple)
        {
                HeapTuple result =
heap_tuple_from_minimal_tuple(slot->tts_mintuple);
                HeapTupleHeaderSetTypeId(result->t_data,
slot->tts_tupleDescriptor->tdtypeid);
                HeapTupleHeaderSetTypMod(result->t_data,
slot->tts_tupleDescriptor->tdtypmod);
                return result;
        }
*/
    ...
}


pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #14984: function "heap_tuple_from_minimal_tuple" lostHeapTupleHeader->t_len value
Next
From: PG Bug reporting form
Date:
Subject: BUG #14986: -2147483648 is minimum value of integer but-2147483648::integer fails (out of range).