Re: Add LINE: hint when schemaname.typename is a non-existent schema

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Ryan Kelly <rpkelly22(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add LINE: hint when schemaname.typename is a non-existent schema
Date: 2015-02-03 15:45:07
Message-ID: CA+Tgmoav45qnftyw0BmkAwPz4kPJj+aFzbet5-o3+cHnG--ksA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 2, 2015 at 2:44 PM, Ryan Kelly <rpkelly22(at)gmail(dot)com> wrote:
> The attached patch adds a LINE: ... hint when schemaname.typename
> results in a schema which does not exist. I came across this when a
> missing comma in a SELECT list resulted in an error without a location
> in a query a few thousand lines long.
>
> Before:
>
> (postgres(at)[local]:5432 14:41:25) [postgres]> select test.id 'all' as
> example from test;
> ERROR: 3F000: schema "test" does not exist
> LOCATION: get_namespace_oid, namespace.c:2826
>
> After:
>
> (postgres(at)[local]:5433 14:42:32) [postgres]> select test.id 'all' as
> example from test;
> ERROR: 3F000: schema "test" does not exist
> LINE 1: select test.id 'all' as example from test;
> ^
> LOCATION: LookupTypeName, parse_type.c:171
>
> -Ryan Kelly

Please add your patch to
https://commitfest.postgresql.org/action/commitfest_view/open so do we
don't forget about it.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2015-02-03 15:45:40 Re: Getting rid of wal_level=archive and default to hot_standby + wal_senders
Previous Message Heikki Linnakangas 2015-02-03 15:44:33 Re: Redesigning checkpoint_segments