Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eRgNX-0006f9-3X for pgsql-bugs@arkaria.postgresql.org; Wed, 20 Dec 2017 15:33:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eRgNW-0003Me-6n for pgsql-bugs@arkaria.postgresql.org; Wed, 20 Dec 2017 15:33:54 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eRgNV-0003MU-U3 for pgsql-bugs@lists.postgresql.org; Wed, 20 Dec 2017 15:33:54 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eRgNT-0003aI-9f for pgsql-bugs@postgresql.org; Wed, 20 Dec 2017 15:33:52 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 5378A20BB5; Wed, 20 Dec 2017 10:33:50 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Wed, 20 Dec 2017 10:33:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=3q5HMQARGm4OzF/aviKpVcdG0/fOE XoW4OOd/Ti5qPc=; b=rnHDomm9xkJwFvAglmFs6o+UO1gZu4gqkhpqRPW3zlBTv 3d+8z2ylWsiIUAmJQ3qgbo5XB7EFAoEOBGXT1J65nQuVuTUF+wD2hmETBzCdB1Sn 0GKrZjNv3FWBUkiGt1lA3Lx1lrBrKjE4A2wJqpbWdlBz6EjmIxQxL16wvhbJWjQQ gfumT5PrbBL4482iDVI89B8CXrFAK6HbAtXMJlrrCu7Xr3Pvj92dKL8Eye+qc2aU VPVkyK6j0rwAJ1rx5e1eRbyL4Fgc/qmT5lVEVaLK+Jju2andg5+ETP0GUSbTZKiB XdHLcyt8pYIehQ6cYqPvBZRQnInsmsN2PzDBFR6zg== X-ME-Sender: Received: from intern.anarazel.de (unknown [172.56.30.31]) by mail.messagingengine.com (Postfix) with ESMTPA id DB3567E537; Wed, 20 Dec 2017 10:33:49 -0500 (EST) Date: Wed, 20 Dec 2017 07:33:46 -0800 From: Andres Freund To: bucoo@sohu.com, pgsql-bugs@postgresql.org Subject: Re: BUG #14985: ExecCopySlotTuple not set "type id" and "type mod" when from minial tuple" Message-ID: <20171220153346.cxsl7nmf5372v76s@alap3.anarazel.de> References: <20171220100540.25742.92719@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171220100540.25742.92719@wrigleys.postgresql.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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