Re: BUG #15668: Server crash in transformPartitionRangeBounds
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Michael Paquier <michael@paquier.xyz>,
Amit Langote <amitlangote09@gmail.com>, Alexander Lakhin <exclusion@gmail.com>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>, PostgreSQL-development <pgsql-hackers@postgresql.org>, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Date: 2019-03-12T15:13:14Z
Lists: pgsql-bugs, pgsql-hackers
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".
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Commits
-
Fix crash when using partition bound expressions
- cdde886d36b5 12.0 landed
-
Allow generalized expression syntax for partition bounds
- 7c079d7417a8 12.0 cited