pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: bucoo@sohu.com
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #14985: ExecCopySlotTuple not set "type id" and "type mod" when from minial tuple"
Date: Wed, 20 Dec 2017 07:33:46 -0800
Message-ID: <20171220153346.cxsl7nmf5372v76s@alap3.anarazel.de> (raw)
In-Reply-To: <20171220100540.25742.92719@wrigleys.postgresql.org>
References: <20171220100540.25742.92719@wrigleys.postgresql.org>

Hi,

On 2017-12-20 10:05:40 +0000, PG Bug reporting form wrote:
> 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:        

This also isn't a proper bug report. If you've API questions you
shouldn't open bug reports, instead ask on the general mailing list or
such.


> 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;
>         }
> */
> 	...
> }
> 

No, it shouldn't. It seems you're looking for ExecFetchSlotTupleDatum().

Greetings,

Andres Freund




view thread (3+ messages)  latest in thread

Message-ID: <20171220153346.cxsl7nmf5372v76s@alap3.anarazel.de>
Permalink:  ../20171220153346.cxsl7nmf5372v76s@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20171220153346.cxsl7nmf5372v76s@alap3.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: andres@anarazel.de, bucoo@sohu.com
  Subject: Re: BUG #14985: ExecCopySlotTuple not set "type id" and "type mod" when from minial tuple"
  In-Reply-To: <20171220153346.cxsl7nmf5372v76s@alap3.anarazel.de>
  References: <20171220100540.25742.92719@wrigleys.postgresql.org> <20171220153346.cxsl7nmf5372v76s@alap3.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox