From e86fdb0ab224eaa73d907ab16a2dd0e0058699e0 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 26 Aug 2011 10:41:31 -0400 Subject: Support non-ASCII letters in psql variable names. As in the backend, the implementation actually accepts any non-ASCII character, but we only document that you can use letters. --- doc/src/sgml/ref/psql-ref.sgml | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 2db4adff4b9..7e30c57c35b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -2206,7 +2206,7 @@ lo_import 152801 - Valid variable names can contain characters, digits, and + Valid variable names can contain letters, digits, and underscores. See the section below for details. @@ -2461,8 +2461,12 @@ lo_import 152801 psql provides variable substitution features similar to common Unix command shells. Variables are simply name/value pairs, where the value - can be any string of any length. To set variables, use the - psql meta-command + can be any string of any length. The name must consist of letters + (including non-Latin letters), digits, and underscores. + + + + To set a variable, use the psql meta-command \set: testdb=> \set foo bar @@ -2498,16 +2502,15 @@ bar - psql's internal variable names can - consist of letters, numbers, and underscores in any order and any - number of them. A number of these variables are treated specially - by psql. They indicate certain option + A number of these variables are treated specially + by psql. They represent certain option settings that can be changed at run time by altering the value of - the variable or that represent some state of the application. Although - you can use these variables for any other purpose, this is not + the variable, or in some cases represent changeable state of + psql. Although + you can use these variables for other purposes, this is not recommended, as the program behavior might grow really strange - really quickly. By convention, all specially treated variables - consist of all upper-case letters (and possibly numbers and + really quickly. By convention, all specially treated variables' names + consist of all upper-case ASCII letters (and possibly digits and underscores). To ensure maximum compatibility in the future, avoid using such variable names for your own purposes. A list of all specially treated variables follows. -- cgit v1.2.3