Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fV0U5-00077w-BV for pgsql-admin@arkaria.postgresql.org; Mon, 18 Jun 2018 20:10:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fV0U3-0001kT-SG for pgsql-admin@arkaria.postgresql.org; Mon, 18 Jun 2018 20:10:39 +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_SHA384:256) (Exim 4.89) (envelope-from ) id 1fV0U3-0001kJ-Km for pgsql-admin@lists.postgresql.org; Mon, 18 Jun 2018 20:10:39 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fV0U0-00048k-MT for pgsql-admin@lists.postgresql.org; Mon, 18 Jun 2018 20:10:39 +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 w5IKAXBR024415; Mon, 18 Jun 2018 16:10:33 -0400 From: Tom Lane To: David Modica cc: "pgsql-admin@lists.postgresql.org" Subject: Re: binary upgade errors In-reply-to: <0c70b27484974f60aae44d91101893a0@imaginesoftware.com> References: <7cb957dd12774a52ac8a680b73910c5b@imaginesoftware.com> <10537.1529007868@sss.pgh.pa.us> <0c70b27484974f60aae44d91101893a0@imaginesoftware.com> Comments: In-reply-to David Modica message dated "Mon, 18 Jun 2018 19:53:26 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <24413.1529352633.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 18 Jun 2018 16:10:33 -0400 Message-ID: <24414.1529352633@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk David Modica writes: > isn't 0::uint1 casting an int as uint and '0'::uint1 is casting a text a= s a uint1 ? No. 0 is an integer constant and so the first case requires invoking an int -> uint1 cast. The second syntax implies applying uint1's type input function to the string '0', and arriving at a constant immediately. It's perhaps unfortunate that similar-looking syntax means two basically different things ... but it's not the only place in SQL where much turns on punctuation. https://www.postgresql.org/docs/current/static/sql-expressions.html#SQL-SY= NTAX-TYPE-CASTS regards, tom lane