\pset format latex
\o out.tex


DROP SCHEMA IF EXISTS latex_test CASCADE;
CREATE SCHEMA latex_test;

SET SEARCH_PATH TO latex_test;


CREATE OR REPLACE FUNCTION t4bruce1(i integer)
        RETURNS void AS $_$
DECLARE
BEGIN
END;
$_$
 LANGUAGE 'plpgsql'
 VOLATILE;

COMMENT ON FUNCTION t4bruce1(i integer)
    IS  $_$This function and so on enter
		another enter,
		just one more.
        $_$;

        
CREATE OR REPLACE FUNCTION t4bruce2(v varchar)
        RETURNS varchar AS $_$
DECLARE
BEGIN
	RETURN	v;
END;
$_$
 LANGUAGE 'plpgsql'
 VOLATILE;

COMMENT ON FUNCTION t4bruce2(v varchar)
    IS  $_$This function and so on enter
		another enter,
		just one more,
		so now have even one more.
        $_$;
        
/*
CREATE OR REPLACE FUNCTION t4bruce3(v varchar)
        RETURNS varchar AS $_$
DECLARE
BEGIN
	RETURN	v;
END;
$_$
 LANGUAGE 'plpgsql'
 VOLATILE;

COMMENT ON FUNCTION t4bruce3(v varchar)
    IS  $_$This function and so on enter
		another enter,
		just one more,this is a very long line without an enter, just one more,this is a very long line without an enter
		so now have even one more.
        $_$;
*/


SELECT n.nspname as "Schema",
  p.proname as "Name",
  pg_catalog.obj_description(p.oid, 'pg_proc') as "Description"
FROM pg_catalog.pg_proc p
     LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace
     LEFT JOIN pg_catalog.pg_language l ON l.oid = p.prolang
WHERE pg_catalog.pg_function_is_visible(p.oid)
      AND n.nspname = 'latex_test'
ORDER BY 1, 2;

\o
\pset format aligned
