Skip to content

Commit e7d5ffe

Browse files
committed
doc: Improve example formatting
Erwin Brandstetter
1 parent 53ecfdd commit e7d5ffe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/src/sgml/plpgsql.sgml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1694,13 +1694,13 @@ CREATE TABLE foo (fooid INT, foosubid INT, fooname TEXT);
16941694
INSERT INTO foo VALUES (1, 2, 'three');
16951695
INSERT INTO foo VALUES (4, 5, 'six');
16961696

1697-
CREATE OR REPLACE FUNCTION getAllFoo() RETURNS SETOF foo AS
1697+
CREATE OR REPLACE FUNCTION get_all_foo() RETURNS SETOF foo AS
16981698
$BODY$
16991699
DECLARE
17001700
r foo%rowtype;
17011701
BEGIN
1702-
FOR r IN SELECT * FROM foo
1703-
WHERE fooid > 0
1702+
FOR r IN
1703+
SELECT * FROM foo WHERE fooid > 0
17041704
LOOP
17051705
-- can do some processing here
17061706
RETURN NEXT r; -- return current row of SELECT
@@ -1710,7 +1710,7 @@ END
17101710
$BODY$
17111711
LANGUAGE plpgsql;
17121712

1713-
SELECT * FROM getallfoo();
1713+
SELECT * FROM get_all_foo();
17141714
</programlisting>
17151715
</para>
17161716

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy