Commit e7d5ffe8 authored by Peter Eisentraut's avatar Peter Eisentraut

doc: Improve example formatting

Erwin Brandstetter
parent 53ecfddc
......@@ -1694,13 +1694,13 @@ CREATE TABLE foo (fooid INT, foosubid INT, fooname TEXT);
INSERT INTO foo VALUES (1, 2, 'three');
INSERT INTO foo VALUES (4, 5, 'six');
CREATE OR REPLACE FUNCTION getAllFoo() RETURNS SETOF foo AS
CREATE OR REPLACE FUNCTION get_all_foo() RETURNS SETOF foo AS
$BODY$
DECLARE
r foo%rowtype;
BEGIN
FOR r IN SELECT * FROM foo
WHERE fooid > 0
FOR r IN
SELECT * FROM foo WHERE fooid > 0
LOOP
-- can do some processing here
RETURN NEXT r; -- return current row of SELECT
......@@ -1710,7 +1710,7 @@ END
$BODY$
LANGUAGE plpgsql;
SELECT * FROM getallfoo();
SELECT * FROM get_all_foo();
</programlisting>
</para>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment