From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Column mis-spelling hints vs case folding |
Date: | 2015-04-07 13:37:21 |
Message-ID: | CA+TgmoYzdswciGjC4ejD_rpYEd=vEYzJC0NeKHRreFOofhnz2g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Apr 5, 2015 at 12:16 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> 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.
If you want to make that change, I will not object.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Stark | 2015-04-07 14:04:16 | Re: Column mis-spelling hints vs case folding |
Previous Message | Fabrízio de Royes Mello | 2015-04-07 13:12:02 | Re: Proposal : REINDEX xxx VERBOSE |