Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUybp-0001c9-Ov for pgsql-hackers@arkaria.postgresql.org; Fri, 29 Dec 2017 17:38:17 +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 1eUybp-00036g-Bj for pgsql-hackers@arkaria.postgresql.org; Fri, 29 Dec 2017 17:38:17 +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 1eUybp-00036W-2M for pgsql-hackers@lists.postgresql.org; Fri, 29 Dec 2017 17:38:17 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eUybi-0000Mh-Lz for pgsql-hackers@lists.postgresql.org; Fri, 29 Dec 2017 17:38:15 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id vBTHc9eO025348; Fri, 29 Dec 2017 12:38:09 -0500 From: Tom Lane To: Pavel Stehule cc: PostgreSQL Hackers Subject: Re: Converting plpgsql to use DTYPE_REC for named composite types In-reply-to: References: <8962.1514399547@sss.pgh.pa.us> Comments: In-reply-to Pavel Stehule message dated "Fri, 29 Dec 2017 18:26:25 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <25346.1514569089.1@sss.pgh.pa.us> Date: Fri, 29 Dec 2017 12:38:09 -0500 Message-ID: <25347.1514569089@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Pavel Stehule writes: > Interesting part from test: > alter table mutable drop column f1; > alter table mutable add column f1 float8; > -- currently, this fails due to cached plan for "r.f1 + 1" expression > select sillyaddone(42); > ERROR: type of parameter 4 (double precision) does not match that when > preparing the plan (integer) > CONTEXT: PL/pgSQL function sillyaddone(integer) line 1 at RETURN > In this case, can we invalidate plan cache? That's something I expect we can improve in followon patches, but it seems a bit outside the scope of this patch (which is mighty big already). > Because PLPGSQL_NSTYPE_ROW is removed, then "switch" statement is maybe > useless I'd just as soon leave it as a switch, for possible future expansion. > why is in exec_assign_value still case for PLPGSQL_DTYPE_ROW ? Take it out and see ;-). The whole point of having DTYPE_ROW at all is to support stuff like "SELECT ... INTO a,b,c". regards, tom lane