Re: Why does the PL/pgSQL compiler do this? - Mailing list pgsql-sql

From Tom Lane
Subject Re: Why does the PL/pgSQL compiler do this?
Date
Msg-id 20520.1477967933@sss.pgh.pa.us
Whole thread Raw
In response to Re: Why does the PL/pgSQL compiler do this?  (Michael Moore <michaeljmoore@gmail.com>)
Responses Re: Why does the PL/pgSQL compiler do this?
List pgsql-sql
Michael Moore <michaeljmoore@gmail.com> writes:
> I'm still a bit confused. If I replace the ROLLBACK; command with ELEPHANT;
> the result is a syntax error. Why doesn't ROLLBACK; produce the same error
> since it is not valid in the LANGUAGE plpgsql.

That's a runtime error so far as plpgsql is concerned, because it relies
on the SPI layer to throw the error.  It might be practical to complain
about it at compile time, but it would be some extra code that nobody's
written.
        regards, tom lane



pgsql-sql by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Why does the PL/pgSQL compiler do this?
Next
From: Michael Moore
Date:
Subject: Re: Why does the PL/pgSQL compiler do this?