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 1n5Uch-0007US-7B for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Jan 2022 15:24:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n5Ucf-0004EG-UD for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Jan 2022 15:24:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n5Ucf-0004E6-LY for pgsql-hackers@lists.postgresql.org; Thu, 06 Jan 2022 15:24:13 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n5Ucd-0004Lb-EO for pgsql-hackers@lists.postgresql.org; Thu, 06 Jan 2022 15:24:12 +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 206FO9qR1070418; Thu, 6 Jan 2022 10:24:09 -0500 From: Tom Lane To: Amit Langote cc: Robert Haas , Justin Pryzby , PostgreSQL Hackers Subject: Re: sqlsmith: ERROR: XX000: bogus varno: 2 In-reply-to: References: <20211219205422.GT17618@telsasoft.com> <2209221.1639948636@sss.pgh.pa.us> <2445883.1640017555@sss.pgh.pa.us> <2524668.1640024031@sss.pgh.pa.us> <2598851.1640028995@sss.pgh.pa.us> <2657967.1640035211@sss.pgh.pa.us> Comments: In-reply-to Amit Langote message dated "Thu, 06 Jan 2022 15:43:59 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1070416.1641482649.1@sss.pgh.pa.us> Date: Thu, 06 Jan 2022 10:24:09 -0500 Message-ID: <1070417.1641482649@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Amit Langote writes: > Thanks for addressing that in the patch you posted. I guess fixing > only expression_tree_walker/mutator() suffices for now, but curious to > know if it was intentional that you decided not to touch the following > sites: > exprCollation(): it would perhaps make sense to return the collation > assigned to the 1st element of listdatums/lowerdatums/upperdatums, > especially given that transformPartitionBoundValue() does assign a > collation to the values in those lists based on the parent's partition > key specification. But each column could have a different collation, no? I do not think it's sensible to pick one of those at random and claim that's the collation of the whole thing. So throwing an error seems appropriate. > exprType(): could be handled similarly The same, in spades. Anybody who is asking for "the type" of a relpartbound is misguided. > queryjumble.c: JumbleExpr(): whose header comment says: If somebody needs that, I wouldn't object to adding support there. But right now it would just be dead code, so why bother? regards, tom lane