pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
To: Michael Paquier <michael@paquier.xyz>
To: Amit Langote <amitlangote09@gmail.com>
Cc: exclusion@gmail.com, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Subject: Re: BUG #15668: Server crash in transformPartitionRangeBounds
Date: Wed, 6 Mar 2019 16:00:42 +0900
Message-ID: <6ed2c24c-2f73-fa1c-0ed1-ed3597f13d0d@lab.ntt.co.jp> (raw)
In-Reply-To: <20190306064825.GH30982@paquier.xyz>
References: <15668-0377b1981aa1a393@postgresql.org>
	<CA+HiwqEGoa485g18mt9GUdF8fH4mKDgpeoc32XiW-dRUFpN5Lw@mail.gmail.com>
	<20190306064825.GH30982@paquier.xyz>

Hi,

On 2019/03/06 15:48, Michael Paquier wrote:
> On Tue, Mar 05, 2019 at 11:04:17PM +0900, Amit Langote wrote:
>> Maybe we should error out as follows in
>> transformPartitionRangeBounds(), although that means we'll get
>> different error message than when using list partitioning syntax:
> 
> Hm.  I don't think that this is a good idea as you could lose some
> information for the expression transformation handling, and the error
> handling becomes inconsistent depending on the partition bound
> strategy.  It seems to me that if we cannot extract any special value
> from the ColumnRef expression generated, then we ought to let
> transformPartitionBoundValue() and particularly transformExprRecurse()
> do the analysis work and complain if needed:
> =# CREATE TABLE rp_part PARTITION OF range_parted FOR VALUES FROM
> (unknown.unknown) TO (1);
> ERROR:  42P01: missing FROM-clause entry for table "unknown"
> LINE 1: ...p_part PARTITION OF range_parted FOR VALUES FROM
> (unknown.un...
> =# CREATE TABLE rp_part PARTITION OF range_parted FOR VALUES FROM
> (a.a.a.a.a.a.a.a.a.a.a.a) TO (1);
> ERROR:  42601: improper qualified name (too many dotted names):
> a.a.a.a.a.a.a.a.a.a.a.a
> LINE 1: ...p_part PARTITION OF range_parted FOR VALUES FROM
> (a.a.a.a.a....
> 
> What about something like the attached instead?  Minus the test
> cases which should go to create_table.sql of course.

Thanks for looking at this.  Your patch seems better, because it allows us
to keep the error message consistent with the message one would get with
list-partitioned syntax.

Thanks,
Amit





view thread (20+ messages)  latest in thread

Message-ID: <6ed2c24c-2f73-fa1c-0ed1-ed3597f13d0d@lab.ntt.co.jp>
Permalink:  ../6ed2c24c-2f73-fa1c-0ed1-ed3597f13d0d@lab.ntt.co.jp/
Also on:    postgresql.org/message-id/6ed2c24c-2f73-fa1c-0ed1-ed3597f13d0d@lab.ntt.co.jp

 · 

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: Langote_Amit_f8@lab.ntt.co.jp, michael@paquier.xyz, amitlangote09@gmail.com, pgsql-hackers@postgresql.org, peter.eisentraut@2ndquadrant.com
  Subject: Re: BUG #15668: Server crash in transformPartitionRangeBounds
  In-Reply-To: <6ed2c24c-2f73-fa1c-0ed1-ed3597f13d0d@lab.ntt.co.jp>
  References: <15668-0377b1981aa1a393@postgresql.org> <CA+HiwqEGoa485g18mt9GUdF8fH4mKDgpeoc32XiW-dRUFpN5Lw@mail.gmail.com> <20190306064825.GH30982@paquier.xyz> <6ed2c24c-2f73-fa1c-0ed1-ed3597f13d0d@lab.ntt.co.jp>

* 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