Re: BUG #15668: Server crash in transformPartitionRangeBounds

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Amit Langote <amitlangote09(at)gmail(dot)com>, Alexander Lakhin <exclusion(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Subject: Re: BUG #15668: Server crash in transformPartitionRangeBounds
Date: 2019-03-12 15:13:14
Message-ID: CA+TgmoY7UWpd-01_vwhQ62yivvnvmFM=6BQq-G-HJzzwvCed9g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Mon, Mar 11, 2019 at 2:45 AM Amit Langote
<Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)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".

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Jon Wedell 2019-03-12 15:36:45 Bug involving plus sign before newline in text field being duplicated or stripped
Previous Message Oluwalana Onalaja 2019-03-12 11:24:50 Re: Installation issue

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2019-03-12 16:04:55 Re: Update does not move row across foreign partitions in v11
Previous Message Robert Haas 2019-03-12 15:07:11 Re: Should we add GUCs to allow partition pruning to be disabled?