From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Column mis-spelling hints vs case folding |
Date: | 2015-04-05 16:16:39 |
Message-ID: | 24297.1428250599@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
A newbie error that we see *constantly* is misunderstanding identifier
case-folding rules. ISTM that commit e529cd4ff missed a chance to help
with that. You do get a hint for this:
regression=# create table t1 (foo int, "Bar" int);
CREATE TABLE
regression=# select bar from t1;
ERROR: column "bar" does not exist
LINE 1: select bar from t1;
^
HINT: Perhaps you meant to reference the column "t1"."Bar".
but apparently it's just treating that as a vanilla one-mistyped-character
error, because there's no hint for this:
regression=# create table t2 (foo int, "BAR" int);
CREATE TABLE
regression=# select BAR from t2;
ERROR: column "bar" does not exist
LINE 1: select BAR from t2;
^
I think this hint might be a lot more useful if its comparison mechanism
were case-insensitive.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Artem Luzyanin | 2015-04-05 18:50:59 | PATCH: Spinlock Documentation |
Previous Message | Simon Riggs | 2015-04-05 15:56:42 | Re: PATCH: Reducing lock strength of trigger and foreign key DDL |