diff options
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/psql-ref.sgml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 60bafa81754..e7a3e17c67b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -783,6 +783,10 @@ testdb=> The forms <literal>:'<replaceable>variable_name</>'</literal> and <literal>:"<replaceable>variable_name</>"</literal> described there work as well. + The <literal>:{?<replaceable>variable_name</>}</> syntax allows + testing whether a variable is defined. It is substituted by + TRUE or FALSE. + Escaping the colon with a backslash protects it from substitution. </para> <para> @@ -3939,6 +3943,12 @@ testdb=> <userinput>INSERT INTO my_table VALUES (:'content');</userinput> </para> <para> + The <literal>:{?<replaceable>name</>}</> special syntax returns TRUE + or FALSE depending on whether the variable exists or not, and is thus + always substituted, unless the colon is backslash-escaped. + </para> + + <para> The colon syntax for variables is standard <acronym>SQL</acronym> for embedded query languages, such as <application>ECPG</application>. The colon syntaxes for array slices and type casts are |