-
+
Server Configuration
-
- default_do_language (string)
-
-
default_do_language> configuration parameter
-
-
- This parameter specifies the language to use when the
- LANGUAGE> option is omitted in a
- statement.
- The default is plpgsql.
-
-
-
-
transaction isolation level
The name of the procedural language the code is written in.
- If omitted, the default is determined by the runtime parameter
- .
+ If omitted, the default is plpgsql>.
The procedural language to be used must already have been installed
into the current database by means of CREATE LANGUAGE>.
+ plpgsql> is installed by default, but other languages are not.
END LOOP;
END$$;
- This example assumes that default_do_language> has its
- default value, namely plpgsql>.
*
*
* 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
.
*
* 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
.
*
- * $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