fix return type of two collectionHQ functions
authorGalen Charlton <gmc@esilibrary.com>
Mon, 30 Dec 2013 18:14:11 +0000 (13:14 -0500)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 30 Dec 2013 18:14:11 +0000 (13:14 -0500)
The write_*_rows_to_stdout() functions return nothing, so
set the return type accordingly to avoid
"control reached end of function without RETURN" warnings.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
collectionHQ/functions.sql

index 1ebb6c2..0cea710 100644 (file)
@@ -79,8 +79,8 @@ CREATE OR REPLACE FUNCTION collectionHQ.quote (TEXT) RETURNS TEXT AS $$
   END;
 $$ LANGUAGE PLPGSQL STRICT STABLE;
 
-
-CREATE OR REPLACE FUNCTION collectionHQ.write_item_rows_to_stdout (TEXT, INT) RETURNS TEXT AS $$
+DROP FUNCTION IF EXISTS collectionHQ.write_item_rows_to_stdout (TEXT, INT);
+CREATE OR REPLACE FUNCTION collectionHQ.write_item_rows_to_stdout (TEXT, INT) RETURNS VOID AS $$
 -- Usage: SELECT collectionHQ.write_item_rows_to_stdout ('LIBRARYCODE',org_unit_id);
 
   DECLARE
@@ -203,7 +203,8 @@ CREATE OR REPLACE FUNCTION collectionHQ.write_item_rows_to_stdout (TEXT, INT) RE
 
 $$ LANGUAGE plpgsql;
 
-CREATE OR REPLACE FUNCTION collectionHQ.write_bib_rows_to_stdout (TEXT, INT) RETURNS TEXT AS $$
+DROP FUNCTION IF EXISTS collectionHQ.write_bib_rows_to_stdout(TEXT, INT);
+CREATE OR REPLACE FUNCTION collectionHQ.write_bib_rows_to_stdout (TEXT, INT) RETURNS VOID AS $$
 -- Usage: SELECT collectionHQ.write_bib_rows_to_stdout('LIBRARYCODE', org_unit_id);
 
   DECLARE