Re: BUG #15668: Server crash in transformPartitionRangeBounds

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, 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 16:35:20
Message-ID: 7846.1552408520@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> 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".

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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2019-03-12 17:08:56 Re: Bug involving plus sign before newline in text field being duplicated or stripped
Previous Message PG Bug reporting form 2019-03-12 15:48:59 BUG #15688: psql cannot connect to database which uses TLS nginx reverse proxy with SSL client auth

Browse pgsql-hackers by date

  From Date Subject
Next Message Paul Ramsey 2019-03-12 16:45:35 Re: Compressed TOAST Slicing
Previous Message Robert Haas 2019-03-12 16:34:10 Re: Best way to keep track of a sliced TOAST