-<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.245 2010/01/23 16:37:12 sriggs Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.246 2010/01/26 16:33:40 tgl Exp $ -->
<chapter Id="runtime-config">
<title>Server Configuration</title>
</listitem>
</varlistentry>
- <varlistentry id="guc-default-do-language" xreflabel="default_do_language">
- <term><varname>default_do_language</varname> (<type>string</type>)</term>
- <indexterm>
- <primary><varname>default_do_language</> configuration parameter</primary>
- </indexterm>
- <listitem>
- <para>
- This parameter specifies the language to use when the
- <literal>LANGUAGE</> option is omitted in a
- <xref linkend="sql-do" endterm="sql-do-title"> statement.
- The default is <literal>plpgsql</literal>.
- </para>
- </listitem>
- </varlistentry>
-
<varlistentry id="guc-default-transaction-isolation" xreflabel="default_transaction_isolation">
<indexterm>
<primary>transaction isolation level</primary>
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/do.sgml,v 1.2 2009/09/23 15:41:51 tgl Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/do.sgml,v 1.3 2010/01/26 16:33:40 tgl Exp $
PostgreSQL documentation
-->
<listitem>
<para>
The name of the procedural language the code is written in.
- If omitted, the default is determined by the runtime parameter
- <xref linkend="guc-default-do-language">.
+ If omitted, the default is <literal>plpgsql</>.
</para>
</listitem>
</varlistentry>
<para>
The procedural language to be used must already have been installed
into the current database by means of <command>CREATE LANGUAGE</>.
+ <literal>plpgsql</> is installed by default, but other languages are not.
</para>
<para>
END LOOP;
END$$;
</programlisting>
- This example assumes that <varname>default_do_language</> has its
- default value, namely <literal>plpgsql</>.
</para>
</refsect1>
<refsect1>
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/functioncmds.c,v 1.114 2010/01/02 16:57:37 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/functioncmds.c,v 1.115 2010/01/26 16:33:40 tgl Exp $
*
* DESCRIPTION
* These routines take the parse tree and pick out the
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("no inline code specified")));
- /* if LANGUAGE option wasn't specified, use the default language */
+ /* if LANGUAGE option wasn't specified, use the default */
if (language_item)
language = strVal(language_item->arg);
else
- language = default_do_language;
+ language = "plpgsql";
/* Convert language name to canonical case */
languageName = case_translate_language_name(language);
* Written by Peter Eisentraut <peter_e@gmx.net>.
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.535 2010/01/24 21:49:17 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.536 2010/01/26 16:33:40 tgl Exp $
*
*--------------------------------------------------------------------
*/
char *pgstat_temp_directory;
-char *default_do_language;
-
char *application_name;
int tcp_keepalives_idle;
},
#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
- },
-
{
{"application_name", PGC_USERSET, LOGGING,
gettext_noop("Sets the application name to be reported in statistics and logs."),
#temp_tablespaces = '' # a list of tablespace names, '' uses
# only default tablespace
#check_function_bodies = on
-#default_do_language = 'plpgsql'
#default_transaction_isolation = 'read committed'
#default_transaction_read_only = off
#session_replication_role = 'origin'
* Copyright (c) 2000-2010, PostgreSQL Global Development Group
* Written by Peter Eisentraut <peter_e@gmx.net>.
*
- * $PostgreSQL: pgsql/src/include/utils/guc.h,v 1.111 2010/01/02 16:58:10 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/utils/guc.h,v 1.112 2010/01/26 16:33:40 tgl Exp $
*--------------------------------------------------------------------
*/
#ifndef GUC_H
extern char *IdentFileName;
extern char *external_pid_file;
-extern char *default_do_language;
-
extern char *application_name;
extern int tcp_keepalives_idle;
LOOP
RAISE NOTICE '%, %', r.roomno, r.comment;
END LOOP;
-END$$ LANGUAGE plpgsql;
+END$$;
NOTICE: 001, Entrance
NOTICE: 002, Office
NOTICE: 003, Office
ERROR: RETURN cannot have a parameter in function returning void
LINE 1: DO LANGUAGE plpgsql $$begin return 1; end$$;
^
-DO LANGUAGE plpgsql $$
+DO $$
DECLARE r record;
BEGIN
FOR r IN SELECT rtrim(roomno) AS roomno, foo FROM Room ORDER BY roomno
LOOP
RAISE NOTICE '%, %', r.roomno, r.comment;
END LOOP;
-END$$ LANGUAGE plpgsql;
+END$$;
-- these are to check syntax error reporting
DO LANGUAGE plpgsql $$begin return 1; end$$;
-DO LANGUAGE plpgsql $$
+DO $$
DECLARE r record;
BEGIN
FOR r IN SELECT rtrim(roomno) AS roomno, foo FROM Room ORDER BY roomno