Re: regclass error reports improperly downcased

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jim Nasby <jnasby(at)enova(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Michael Elterman <melterman(at)enova(dot)com>
Subject: Re: regclass error reports improperly downcased
Date: 2013-11-08 00:41:44
Message-ID: 8369.1383871304@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jim Nasby <jnasby(at)enova(dot)com> writes:
> decibel(at)decina(dot)cashnetusa=# SELECT 'Moo'::regclass;
> ERROR: relation "moo" does not exist at character 8

That's doing what it's supposed to. Compare

regression=# select 'Moo'::regclass;
ERROR: relation "moo" does not exist
LINE 1: select 'Moo'::regclass;
^
regression=# select '"Moo"'::regclass;
ERROR: relation "Moo" does not exist
LINE 1: select '"Moo"'::regclass;
^

The regclass input converter applies the same case-folding rules as
the SQL parser does, ie, fold unless double-quoted.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2013-11-08 01:21:17 Re: stats for network traffic WIP
Previous Message Greg Stark 2013-11-08 00:38:17 Re: regclass error reports improperly downcased