Inline PL/pgSQL
Jonah H. Harris <jharris@tvi.edu>
From: "Jonah H. Harris" <jharris@tvi.edu>
To: pgsql-hackers@postgresql.org
Date: 2005-05-09T17:44:23Z
Lists: pgsql-hackers
Hey everyone, In addition to package support in plpgsql, it would be really handy to have inline plpgsql. Likewise, I think there are others who feel this way as-well. Years ago, Oracle merged PL/SQL with their normal SQL parser which allowed for inline PL/SQL. They did this because it was difficult to maintain two separate parsers. While this worked great for Oracle, it probably wouldn't really work as well for PostgreSQL because pgsql supports multiple procedural languages. As for implementation, I think it would obviously be best to leave plpgsql on its own as a PL but maybe change BEGIN and DECLARE in the normal parser and have the system generate/execute a function on the fly. Or, maybe it would be better to integrate plpgsql. Or, I may just be crazy. Would anyone else ever benefit from inline functions? Does anyone have any ideas about implementation? Please shoot your opinions this way. Thanks. -Jonah