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

From: Ryan Kelly <rpkelly22(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Add LINE: hint when schemaname.typename is a non-existent schema
Date: 2015-02-02 19:44:31
Message-ID: CAHUie26dk4EcF35AWFCyaHLbjpiw2wO_OGBYBJwiSgh0n1gU2Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
missing_type_schema_hint.patch application/octet-stream 886 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2015-02-02 19:59:40 Re: Release note bloat is getting out of hand
Previous Message José Luis Tallón 2015-02-02 19:09:59 Re: Fwd: [GENERAL] 4B row limit for CLOB tables