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 1frdKk-00005G-Mv for pgsql-bugs@arkaria.postgresql.org; Mon, 20 Aug 2018 06:06:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1frdKi-0007fi-Qg for pgsql-bugs@arkaria.postgresql.org; Mon, 20 Aug 2018 06:06:32 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1frdKi-0007fb-H5 for pgsql-bugs@lists.postgresql.org; Mon, 20 Aug 2018 06:06:32 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1frdKf-00080i-BL for pgsql-bugs@lists.postgresql.org; Mon, 20 Aug 2018 06:06:31 +0000 Received: from [192.168.127.1] (port=22934 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.88 (FreeBSD)) (envelope-from ) id 1frdKX-000IbM-Mw; Mon, 20 Aug 2018 06:06:21 +0000 Received: from [127.0.0.1] (port=62890 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.89 (FreeBSD)) (envelope-from ) id 1frdKW-000Hj1-Vj; Mon, 20 Aug 2018 06:06:21 +0000 From: Andrew Gierth To: Amit Langote Cc: Damir =?utf-8?Q?Ciganovi=C4=87-Jankovi=C4=87?= , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15334: Partition elimination not working as expected when using enum as partition key In-Reply-To: (Amit Langote's message of "Mon, 20 Aug 2018 10:00:46 +0900") Message-ID: <8736v938jq.fsf@news-spur.riddles.org.uk> References: <153442831773.1504.1930023229211807055@wrigleys.postgresql.org> <1fff2a8b-92ef-c9e0-6a57-0e887d95c62b@lab.ntt.co.jp> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) Date: Mon, 20 Aug 2018 07:06:19 +0100 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk >>>>> "Amit" == Amit Langote writes: Amit> Andrew also mentioned a workaround in his reply to use setString Amit> such that JDBC doesn't pass 'MONTH' as of type 'text' and instead Amit> as of unknown type. I could't find the documentation of Postgres Amit> JDBC's setString to see how one can do that, but maybe you can Amit> try it out. Disclaimer: I don't do java stuff myself, all I know about this is from reading the code. First, there's a connection parameter stringtype=unspecified that affects all setString calls on the connection. Second, there may be a way to use setObject instead; setObject(1, str, Types.DISTINCT) looks like it might work (or maybe Types.OTHER) - unless I'm completely misreading the pgjdbc code, that should end up sending the right thing to the server. -- Andrew (irc:RhodiumToad)