From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Amit Langote <amitlangote09@gmail.com>
Cc: Alexander Lakhin <exclusion@gmail.com>
Cc: 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: Tue, 12 Mar 2019 12:35:20 -0400
Message-ID: <7846.1552408520@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoY7UWpd-01_vwhQ62yivvnvmFM=6BQq-G-HJzzwvCed9g@mail.gmail.com>
References: <15668-0377b1981aa1a393@postgresql.org>
<CA+HiwqEGoa485g18mt9GUdF8fH4mKDgpeoc32XiW-dRUFpN5Lw@mail.gmail.com>
<20190306064825.GH30982@paquier.xyz>
<6ed2c24c-2f73-fa1c-0ed1-ed3597f13d0d@lab.ntt.co.jp>
<20190306082730.GJ30982@paquier.xyz>
<ab51ec5a-b2d3-a25f-5695-7555ad63d344@lab.ntt.co.jp>
<CA+TgmoY7UWpd-01_vwhQ62yivvnvmFM=6BQq-G-HJzzwvCed9g@mail.gmail.com>
Robert Haas <robertmhaas@gmail.com> writes:
> On Mon, Mar 11, 2019 at 2:45 AM Amit Langote
> <Langote_Amit_f8@lab.ntt.co.jp> wrote:
>> I noticed another issue with the code -- it's using strcmp() to compare
>> specified string against "minvalue" and "maxvalue", which causes the
>> following silly error:
>>
>> create table q2 partition of q for values from ("MINVALUE") to (maxvalue);
>> ERROR: column "MINVALUE" does not exist
>> LINE 1: create table q2 partition of q for values from ("MINVALUE") ...
>>
>> It should be using pg_strncasecmp().
> Uh, why? Generally, an unquoted keyword is equivalent to a quoted
> lowercase version of that same keyword, not anything else. Like
> CREATE TABLE "foo" = CREATE TABLE FOO <> CREATE TABLE "FOO".
Yeah. The behavior shown above is entirely correct, and accepting the
statement would be flat out wrong; it would cause trouble if somebody
created a table containing multiple case-variations of MINVALUE.
regards, tom lane
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: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, Langote_Amit_f8@lab.ntt.co.jp, michael@paquier.xyz, amitlangote09@gmail.com, exclusion@gmail.com, pgsql-hackers@postgresql.org, peter.eisentraut@2ndquadrant.com
Subject: Re: BUG #15668: Server crash in transformPartitionRangeBounds
In-Reply-To: <7846.1552408520@sss.pgh.pa.us>
References: <15668-0377b1981aa1a393@postgresql.org> <CA+HiwqEGoa485g18mt9GUdF8fH4mKDgpeoc32XiW-dRUFpN5Lw@mail.gmail.com> <20190306064825.GH30982@paquier.xyz> <6ed2c24c-2f73-fa1c-0ed1-ed3597f13d0d@lab.ntt.co.jp> <20190306082730.GJ30982@paquier.xyz> <ab51ec5a-b2d3-a25f-5695-7555ad63d344@lab.ntt.co.jp> <CA+TgmoY7UWpd-01_vwhQ62yivvnvmFM=6BQq-G-HJzzwvCed9g@mail.gmail.com> <7846.1552408520@sss.pgh.pa.us>
* 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