David Fetter wrote:
> EXECUTE IMMEDIATE $$
> function body here
> $$
> LANGUAGE plfoo;
Seems like a lot of unnecessary syntax for something that would be
manually used by a lot of DBAs. Also, this is unrelated to normal
EXECUTE, or the EXECUTE IMMEDIATE defined by the standard, so I'm not
sure it's a good idea to use similar syntax.
BTW, this is a little off-the-wall, but one interesting idea to help SQL
and PL/foo integration would be to replace the bison grammar for SQL
with a hand-written recursive descent parser. If written carefully, this
would allow other procedural languages to "call into" the SQL parser
from their own parsers when appropriate, and integrate the resulting
parse nodes into their own parse tree. PL/PgSQL in HEAD does something a
bit similar for syntax checking, but it's pretty ugly (we need to
manually invoke raw_parser(), and then we throw away the result).
-Neil