From 7e1955b861a1be9ef2dfd6acdd50d0c6b5a75794 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 16 Jan 2014 16:40:17 -0500 Subject: docs: update PL/pgSQL docs about the use of := and = --- src/pl/plpgsql/src/pl_gram.y | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/pl/plpgsql/src/pl_gram.y b/src/pl/plpgsql/src/pl_gram.y index 3fd6655e1be..c0cb58530be 100644 --- a/src/pl/plpgsql/src/pl_gram.y +++ b/src/pl/plpgsql/src/pl_gram.y @@ -796,7 +796,12 @@ decl_defkey : assign_operator | K_DEFAULT ; -assign_operator : '=' /* not documented because it might be removed someday */ +/* + * Ada-based PL/SQL uses := for assignment and variable defaults, while + * the SQL standard uses equals for these cases and for GET + * DIAGNOSTICS, so we support both. FOR and OPEN only support :=. + */ +assign_operator : '=' | COLON_EQUALS ; -- cgit v1.2.3