Re: proposal: more practical view on function's source code - Mailing list pgsql-hackers

From Tom Lane
Subject Re: proposal: more practical view on function's source code
Date
Msg-id 24892.1269194937@sss.pgh.pa.us
Whole thread Raw
In response to Re: proposal: more practical view on function's source code  (Dimitri Fontaine <dfontaine@hi-media.com>)
Responses Re: proposal: more practical view on function's source code
Re: proposal: more practical view on function's source code
List pgsql-hackers
Dimitri Fontaine <dfontaine@hi-media.com> writes:
> I'm not sure what better tool than what Pavel is proposing we already
> have, though.

We have quite decent features for localizing syntax errors in functions, eg

regression=# create function foo(x int) returns int language plpgsql as $$
begin return 1/;
end$$;
ERROR:  syntax error at end of input
LINE 3:   return 1/;                  ^
regression=# 

What I think is called for is extending that approach to run-time
errors.  plpgsql doesn't make any particular effort to provide that
right now, but it easily could IMO.  Pavel's proposal is only of use to
people using psql, which is not everyone --- and it seems pretty awkward
to me even for psql users.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: proposal: more practical view on function's source code
Next
From: Dimitri Fontaine
Date:
Subject: Re: proposal: more practical view on function's source code