1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Implement the DO statement to support execution of PL code without having

to create a function for it.

Procedural languages now have an additional entry point, namely a function
to execute an inline code block.  This seemed a better design than trying
to hide the transient-ness of the code from the PL.  As of this patch, only
plpgsql has an inline handler, but probably people will soon write handlers
for the other standard PLs.

In passing, remove the long-dead LANCOMPILER option of CREATE LANGUAGE.

Petr Jelinek
This commit is contained in:
Tom Lane
2009-09-22 23:43:43 +00:00
parent d5a43ffde0
commit 9048b73184
34 changed files with 970 additions and 140 deletions

View File

@ -10,7 +10,7 @@
* Written by Peter Eisentraut <peter_e@gmx.net>.
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.518 2009/09/17 21:15:18 petere Exp $
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.519 2009/09/22 23:43:38 tgl Exp $
*
*--------------------------------------------------------------------
*/
@ -385,6 +385,8 @@ char *external_pid_file;
char *pgstat_temp_directory;
char *default_do_language;
int tcp_keepalives_idle;
int tcp_keepalives_interval;
int tcp_keepalives_count;
@ -2539,6 +2541,15 @@ static struct config_string ConfigureNamesString[] =
},
#endif /* USE_SSL */
{
{"default_do_language", PGC_USERSET, CLIENT_CONN_STATEMENT,
gettext_noop("Sets the language used in DO statement if LANGUAGE is not specified."),
NULL
},
&default_do_language,
"plpgsql", NULL, NULL
},
/* End-of-list marker */
{
{NULL, 0, 0, NULL, NULL}, NULL, NULL, NULL, NULL