Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hil3u-00073W-Fz for pgsql-general@arkaria.postgresql.org; Wed, 03 Jul 2019 19:37:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hil3t-00063Q-Cn for pgsql-general@arkaria.postgresql.org; Wed, 03 Jul 2019 19:37:01 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hil3s-0005zB-Vc for pgsql-general@lists.postgresql.org; Wed, 03 Jul 2019 19:37:01 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hil3q-0007jf-Gq for pgsql-general@postgresql.org; Wed, 03 Jul 2019 19:36:59 +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 x63JauW4003062; Wed, 3 Jul 2019 15:36:57 -0400 From: Tom Lane To: Steve Rogerson cc: "pgsql-general@postgresql.org" Subject: Re: postgres 11 issue? In-reply-to: <6fd9353d-96f5-7114-13cf-f660a581d985@yewtc.demon.co.uk> References: <20190606160610.GA17846@alvherre.pgsql> <6fd9353d-96f5-7114-13cf-f660a581d985@yewtc.demon.co.uk> Comments: In-reply-to Steve Rogerson message dated "Wed, 03 Jul 2019 16:42:28 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3060.1562182616.1@sss.pgh.pa.us> Date: Wed, 03 Jul 2019 15:36:56 -0400 Message-ID: <3061.1562182616@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Steve Rogerson writes: >> It seems a bug to me. Can you share an anonymized/simplified definition >> of that table that reproduces the problem? > Ok See attached sql set up. I guess you need to to a createdb first. It looks like what's happening is that the result of my_from_local() is being stored into the table as an anonymous record value rather than a value of type my_timestamp. (The originating session can figure out what the anonymous record type is, but no other session can.) That should be fixed, but in the meantime you could dodge the problem by declaring my_from_local()'s v_result variable as my_timestamp not record. regards, tom lane