Re: BUG #15668: Server crash in transformPartitionRangeBounds - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #15668: Server crash in transformPartitionRangeBounds
Date
Msg-id 7846.1552408520@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #15668: Server crash in transformPartitionRangeBounds  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: BUG #15668: Server crash in transformPartitionRangeBounds  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Re: BUG #15668: Server crash in transformPartitionRangeBounds  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
List pgsql-bugs
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


pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #15688: psql cannot connect to database which uses TLS nginx reverse proxy with SSL client auth
Next
From: Alvaro Herrera
Date:
Subject: Re: Bug involving plus sign before newline in text field beingduplicated or stripped