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 1ga5Sm-0007xN-El for pgsql-general@arkaria.postgresql.org; Thu, 20 Dec 2018 21:02:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ga5Sl-0001yO-33 for pgsql-general@arkaria.postgresql.org; Thu, 20 Dec 2018 21:02:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ga5Sk-0001yG-RL for pgsql-general@lists.postgresql.org; Thu, 20 Dec 2018 21:02:34 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ga5Si-0000q6-Ed for pgsql-general@postgresql.org; Thu, 20 Dec 2018 21:02:34 +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 wBKL2SF1019986; Thu, 20 Dec 2018 16:02:28 -0500 From: Tom Lane To: Chuck Martin cc: pgsql-general Subject: Re: Change from 9.6 to 11? In-reply-to: References: Comments: In-reply-to Chuck Martin message dated "Thu, 20 Dec 2018 15:35:23 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19984.1545339748.1@sss.pgh.pa.us> Date: Thu, 20 Dec 2018 16:02:28 -0500 Message-ID: <19985.1545339748@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Chuck Martin writes: > I hope someone here can see something that eludes me. I've recently moved a > database from PostgreSQL 9.6 to 11, and there are a few oddities. The > following select statement returns zero rows when it should return one. > This is one of a small number of records that exist, but are not returned > by the query. When I include the main table, event, and any one of the > associated tables, the record is returned, but no record is returned with > the entire statement. All the primary keys (_pkey) and foreign keys (_fkey) > are integers. The field I suspect as the possible culprit, event.InsBy, is > a character column I'm converting to do a lookup on a primary key > (integer): event.InsBy::int = usr.Usr_pkey. Maybe PG 11 doesn't recognize > the same syntax for cast as PG 9.6? Or maybe I'm overlooking something else > basic. Thanks for reading! Maybe you've found a bug. Can you extract a self-contained case exhibiting this behavior? Is this 11.0 or 11.1? regards, tom lane