Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Doc: fix confusion about LEAKPROOF in syntax summaries.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 23 Jun 2021 18:27:13 +0000 (14:27 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 23 Jun 2021 18:27:13 +0000 (14:27 -0400)
The syntax summaries for CREATE FUNCTION and allied commands
made it look like LEAKPROOF is an alternative to
IMMUTABLE/STABLE/VOLATILE, when of course it is an orthogonal
option.  Improve that.

Per gripe from aazamrafeeque0.  Thanks to David Johnston for
suggestions.

Discussion: https://postgr.es/m/162444349581.694.5818572718530259025@wrigleys.postgresql.org

doc/src/sgml/ref/alter_function.sgml
doc/src/sgml/ref/alter_routine.sgml
doc/src/sgml/ref/create_function.sgml

index 70b1f24bc003a7459cc86ac04e92d99c51d3feaf..c5d12af25cdc620f12dcd9099fc830cf4c500ec5 100644 (file)
@@ -35,7 +35,8 @@ ALTER FUNCTION <replaceable>name</replaceable> [ ( [ [ <replaceable class="param
 <phrase>where <replaceable class="parameter">action</replaceable> is one of:</phrase>
 
     CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT | STRICT
-    IMMUTABLE | STABLE | VOLATILE | [ NOT ] LEAKPROOF
+    IMMUTABLE | STABLE | VOLATILE
+    [ NOT ] LEAKPROOF
     [ EXTERNAL ] SECURITY INVOKER | [ EXTERNAL ] SECURITY DEFINER
     PARALLEL { UNSAFE | RESTRICTED | SAFE }
     COST <replaceable class="parameter">execution_cost</replaceable>
index a2c44288102a74bf931b7b95e8ee96f0b1709ccb..ed0cbb2f1f4a9b4b64ab088d277ff56c3a1ccc8e 100644 (file)
@@ -34,7 +34,8 @@ ALTER ROUTINE <replaceable>name</replaceable> [ ( [ [ <replaceable class="parame
 
 <phrase>where <replaceable class="parameter">action</replaceable> is one of:</phrase>
 
-    IMMUTABLE | STABLE | VOLATILE | [ NOT ] LEAKPROOF
+    IMMUTABLE | STABLE | VOLATILE
+    [ NOT ] LEAKPROOF
     [ EXTERNAL ] SECURITY INVOKER | [ EXTERNAL ] SECURITY DEFINER
     PARALLEL { UNSAFE | RESTRICTED | SAFE }
     COST <replaceable class="parameter">execution_cost</replaceable>
index 1a80f7aaafb90038c7d8eec2c309e2d2765b1c41..01b7d18f9ecc30e450086cfdf7dc2ad6ea2eb98f 100644 (file)
@@ -28,9 +28,10 @@ CREATE [ OR REPLACE ] FUNCTION
   { LANGUAGE <replaceable class="parameter">lang_name</replaceable>
     | TRANSFORM { FOR TYPE <replaceable class="parameter">type_name</replaceable> } [, ... ]
     | WINDOW
-    | IMMUTABLE | STABLE | VOLATILE | [ NOT ] LEAKPROOF
-    | CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT | STRICT
-    | [ EXTERNAL ] SECURITY INVOKER | [ EXTERNAL ] SECURITY DEFINER
+    | { IMMUTABLE | STABLE | VOLATILE }
+    | [ NOT ] LEAKPROOF
+    | { CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT | STRICT }
+    | { [ EXTERNAL ] SECURITY INVOKER | [ EXTERNAL ] SECURITY DEFINER }
     | PARALLEL { UNSAFE | RESTRICTED | SAFE }
     | COST <replaceable class="parameter">execution_cost</replaceable>
     | ROWS <replaceable class="parameter">result_rows</replaceable>