Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h3kNK-0004Nn-N2 for pgsql-bugs@arkaria.postgresql.org; Tue, 12 Mar 2019 16:35:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h3kNJ-0007pR-F5 for pgsql-bugs@arkaria.postgresql.org; Tue, 12 Mar 2019 16:35:33 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h3kNJ-0007dI-2w for pgsql-bugs@lists.postgresql.org; Tue, 12 Mar 2019 16:35:33 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h3kNG-0005er-OC for pgsql-bugs@lists.postgresql.org; Tue, 12 Mar 2019 16:35:31 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x2CGZKak007847; Tue, 12 Mar 2019 12:35:20 -0400 From: Tom Lane To: Robert Haas cc: Amit Langote , Michael Paquier , Amit Langote , Alexander Lakhin , PostgreSQL mailing lists , PostgreSQL-development , Peter Eisentraut Subject: Re: BUG #15668: Server crash in transformPartitionRangeBounds In-reply-to: References: <15668-0377b1981aa1a393@postgresql.org> <20190306064825.GH30982@paquier.xyz> <6ed2c24c-2f73-fa1c-0ed1-ed3597f13d0d@lab.ntt.co.jp> <20190306082730.GJ30982@paquier.xyz> Comments: In-reply-to Robert Haas message dated "Tue, 12 Mar 2019 11:13:14 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <7845.1552408520.1@sss.pgh.pa.us> Date: Tue, 12 Mar 2019 12:35:20 -0400 Message-ID: <7846.1552408520@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Robert Haas writes: > On Mon, Mar 11, 2019 at 2:45 AM Amit Langote > 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