Robert Haas <robertmh...@gmail.com> writes:
> On Mon, Mar 11, 2019 at 2:45 AM Amit Langote
> <langote_amit...@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

Reply via email to