Re: Add LINE: hint when schemaname.typename is a non-existent schema - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Add LINE: hint when schemaname.typename is a non-existent schema
Date
Msg-id 20150318180417.GX3636@alvh.no-ip.org
Whole thread Raw
In response to Re: Add LINE: hint when schemaname.typename is a non-existent schema  (Jeevan Chalke <jeevan.chalke@gmail.com>)
List pgsql-hackers
Jeevan,

Thanks for the review.

Jeevan Chalke wrote:

> I think, there are few open questions here and thus marking it back to "Waiting on Author".
> 
> Please have your views on the review comments already posted.
> Also make changes as Tom suggested about placing pstate at the beginning.

Pushed with that one change.

> postgres=# create or replace function
> f1(a abc.test.id%type) returns int as
> $$ select 1; $$
> language sql;
> ERROR:  schema "abc" does not exist
> 
> Is that expected?

We can leave this for a future patch.

> 2.
> Also what about pushing setup_parser_errposition_callback() inside func_get_detail() as well, just to limit it for
namespacelookup?
 

Seemed messy enough that I left this as-is; and as Tom said elsewhere, I
think it's okay to have cursor position in other errors too.  At the
very least, the user will know for certain what's the function being
processed that caused whatever failure.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Rethinking the parameter access hooks for plpgsql's benefit
Next
From: Fabrízio de Royes Mello
Date:
Subject: Re: Can pg_dump make use of CURRENT/SESSION_USER