The general syntax of a variable declaration is:
-name CONSTANT type COLLATE collation_name NOT NULL { DEFAULT | := } expression ;
+name CONSTANT type COLLATE collation_name NOT NULL { DEFAULT | := | = } expression ;
The DEFAULT> clause, if given, specifies the initial value assigned
to the variable when the block is entered. If the DEFAULT> clause
is specified, an assignment of a null value results in a run-time
error. All variables declared as NOT NULL>
must have a nonnull default value specified.
+ Equals (=>) can be used instead of PL/SQL-compliant
+ :=>.
An assignment of a value to a
PL/pgSQL
variable is written as:
-variable := expression;
+variable { := | = } expression;
As explained previously, the expression in such a statement is evaluated
by means of an SQL SELECT> command sent to the main
a row value, if the variable is a row or record variable). The target
variable can be a simple variable (optionally qualified with a block
name), a field of a row or record variable, or an element of an array
- that is a simple variable or field.
+ that is a simple variable or field. Equals (=>) can be
+ used instead of PL/SQL-compliant :=>.
command, which has the form:
-GET CURRENT DIAGNOSTICS variable = item , ... ;
+GET CURRENT DIAGNOSTICS variable { = | := } item , ... ;
This command allows retrieval of system status indicators. Each
SQL command. Note that
RESULT_OID>
is only useful after an INSERT command into a
table containing OIDs.
+ Equals (:=>) can be used instead of SQL-standard
+ => for GET DIAGNOSTICS>.
GET STACKED DIAGNOSTICS command, which has the form:
-GET STACKED DIAGNOSTICS variable = item , ... ;
+GET STACKED DIAGNOSTICS variable { = | := } item , ... ;
Each item is a key word identifying a status
-GET CURRENT DIAGNOSTICS variable = PG_CONTEXT , ... ;
+GET CURRENT DIAGNOSTICS variable { = | := } PG_CONTEXT , ... ;