diff options
| author | David Rowley <drowley@postgresql.org> | 2025-11-06 16:03:02 +1300 |
|---|---|---|
| committer | David Rowley <drowley@postgresql.org> | 2025-11-06 16:03:02 +1300 |
| commit | 49d43faa835f3c6817be9fc0b98bec0d661c2587 (patch) | |
| tree | 7e05c18da6489861271e5e84d260ac226a362275 /doc/src/sgml/plpython.sgml | |
| parent | 6d0eba66275b125bf634bbdffda90c70856e3f93 (diff) | |
Doc: use uppercase keywords in SQLs
Use uppercase SQL keywords consistently throughout the documentation to
ease reading. Also add whitespace in a couple of places where it
improves readability.
Author: Erik Wienhold <ewie@ewie.name>
Reviewed-by: David Rowley <dgrowleyml@gmail.com>
Discussion: https://postgr.es/m/82eb512b-8ed2-46be-b311-54ffd26978c4%40ewie.name
Diffstat (limited to 'doc/src/sgml/plpython.sgml')
| -rw-r--r-- | doc/src/sgml/plpython.sgml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/src/sgml/plpython.sgml b/doc/src/sgml/plpython.sgml index 27c4467ba7d..c447452b7c5 100644 --- a/doc/src/sgml/plpython.sgml +++ b/doc/src/sgml/plpython.sgml @@ -1065,7 +1065,7 @@ $$ LANGUAGE plpython3u; <programlisting> CREATE FUNCTION count_odd_iterator() RETURNS integer AS $$ odd = 0 -for row in plpy.cursor("select num from largetable"): +for row in plpy.cursor("SELECT num FROM largetable"): if row['num'] % 2: odd += 1 return odd @@ -1073,7 +1073,7 @@ $$ LANGUAGE plpython3u; CREATE FUNCTION count_odd_fetch(batch_size integer) RETURNS integer AS $$ odd = 0 -cursor = plpy.cursor("select num from largetable") +cursor = plpy.cursor("SELECT num FROM largetable") while True: rows = cursor.fetch(batch_size) if not rows: @@ -1086,7 +1086,7 @@ $$ LANGUAGE plpython3u; CREATE FUNCTION count_odd_prepared() RETURNS integer AS $$ odd = 0 -plan = plpy.prepare("select num from largetable where num % $1 <> 0", ["integer"]) +plan = plpy.prepare("SELECT num FROM largetable WHERE num % $1 <> 0", ["integer"]) rows = list(plpy.cursor(plan, [2])) # or: = list(plan.cursor([2])) return len(rows) |
