Re: Verbosity of Function Return Type Checks - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Verbosity of Function Return Type Checks
Date
Msg-id 20080808153354.GA3800@alvh.no-ip.org
Whole thread Raw
In response to Verbosity of Function Return Type Checks  (Volkan YAZICI <yazicivo@ttmail.com>)
Responses Re: Verbosity of Function Return Type Checks  (Volkan YAZICI <yazicivo@ttmail.com>)
Re: Verbosity of Function Return Type Checks  (Volkan YAZICI <yazicivo@ttmail.com>)
List pgsql-hackers
Volkan YAZICI wrote:

> Yesterday I needed to fiddle with PostgreSQL internals to be able to
> debug a PL/pgSQL procedure returning a set of records. I attached the
> patch I used to increase the verbosity of error messages related with
> function return type checks. I'll be appreciated if any developer could
> commit this patch (or a similar one) into the core.

I think this is a good idea, but the new error messages need more work.
Have a look at the message style guidelines please,
http://www.postgresql.org/docs/8.3/static/error-style-guide.html

Particularly I think you need to keep the original errmsg() and add the
new messages as errdetail().  (I notice that there's the slight problem
that the error messages are different for the different callers.)

Also, please use context diffs.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Parsing of pg_hba.conf and authentication inconsistencies
Next
From: Josh Berkus
Date:
Subject: Re: CommitFest July Over