pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Damir Ciganović-Janković <damir.ciganovic.jankovic@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15334: Partition elimination not working as expected when using enum as partition key
Date: Mon, 20 Aug 2018 07:06:19 +0100
Message-ID: <8736v938jq.fsf@news-spur.riddles.org.uk> (raw)
In-Reply-To: <fef69517-a039-027d-7a69-542b97fb14a7@lab.ntt.co.jp>
References: <153442831773.1504.1930023229211807055@wrigleys.postgresql.org>
	<1fff2a8b-92ef-c9e0-6a57-0e887d95c62b@lab.ntt.co.jp>
	<CA+-2sJ6dZaZRnnHfKPRAqnyYF+9Pz4EtDnwNsSJ45jc10hmsgw@mail.gmail.com>
	<dfd66017-7189-ad6b-1c5f-88e37f23ff56@lab.ntt.co.jp>
	<CA+-2sJ5m0QHQcBDXiNduUmHDv-fkzAR61LJg2W+_dUo9bUortw@mail.gmail.com>
	<fef69517-a039-027d-7a69-542b97fb14a7@lab.ntt.co.jp>

>>>>> "Amit" == Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> 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)




view thread (10+ messages)  latest in thread

Message-ID: <8736v938jq.fsf@news-spur.riddles.org.uk>
Permalink:  ../8736v938jq.fsf@news-spur.riddles.org.uk/
Also on:    postgresql.org/message-id/8736v938jq.fsf@news-spur.riddles.org.uk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: andrew@tao11.riddles.org.uk, Langote_Amit_f8@lab.ntt.co.jp, damir.ciganovic.jankovic@gmail.com
  Subject: Re: BUG #15334: Partition elimination not working as expected when using enum as partition key
  In-Reply-To: <8736v938jq.fsf@news-spur.riddles.org.uk>
  References: <153442831773.1504.1930023229211807055@wrigleys.postgresql.org> <1fff2a8b-92ef-c9e0-6a57-0e887d95c62b@lab.ntt.co.jp> <CA+-2sJ6dZaZRnnHfKPRAqnyYF+9Pz4EtDnwNsSJ45jc10hmsgw@mail.gmail.com> <dfd66017-7189-ad6b-1c5f-88e37f23ff56@lab.ntt.co.jp> <CA+-2sJ5m0QHQcBDXiNduUmHDv-fkzAR61LJg2W+_dUo9bUortw@mail.gmail.com> <fef69517-a039-027d-7a69-542b97fb14a7@lab.ntt.co.jp> <8736v938jq.fsf@news-spur.riddles.org.uk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox