Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oEAEQ-0005BY-B6 for pgsql-general@arkaria.postgresql.org; Wed, 20 Jul 2022 13:59:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oEAEP-0005AP-38 for pgsql-general@arkaria.postgresql.org; Wed, 20 Jul 2022 13:59:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oEAEO-00057j-Ol for pgsql-general@lists.postgresql.org; Wed, 20 Jul 2022 13:59:16 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oEAEM-0005i1-LY for pgsql-general@lists.postgresql.org; Wed, 20 Jul 2022 13:59:16 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 26KDxCDu1695444; Wed, 20 Jul 2022 09:59:12 -0400 From: Tom Lane To: Karthik K L V cc: pgsql-general@lists.postgresql.org Subject: Re: operator does not exist: text = bytea In-reply-to: References: Comments: In-reply-to Karthik K L V message dated "Wed, 20 Jul 2022 15:02:13 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1695442.1658325552.1@sss.pgh.pa.us> Date: Wed, 20 Jul 2022 09:59:12 -0400 Message-ID: <1695443.1658325552@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Karthik K L V writes: > We have a query with bind value which sometimes gets resolved to null (no > data) depending on the application scenario. > The datatype of the bindvalue and the corresponding column is String. > The same query executes fine when the value of the bindvalue is populated. > Could you please let me know how I can resolve this issue without making > changes to the query? This seems like it depends on the details of how the JDBC driver sends the bound parameter to the server, so you'd be better off asking in the pgsql-jdbc mailing list (and supplying some code details). It's entirely possible that there isn't any solution other than fixing your app to be more consistent about how it binds the parameter. regards, tom lane