Fixed the second and third function definitions, which wouldn't compile.
authorscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 6 Oct 2010 13:27:26 +0000 (13:27 +0000)
committerscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 6 Oct 2010 13:27:26 +0000 (13:27 +0000)
An SQL function cannot reference its parameters by name, but only by number.

M    Open-ILS/src/sql/Pg/upgrade/0428.schema.hold_retarget.sql

git-svn-id: svn://svn.open-ils.org/ILS/trunk@18192 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/upgrade/0428.schema.hold_retarget.sql

index a4bb4f0..5033911 100644 (file)
@@ -182,11 +182,11 @@ END;
 $func$ LANGUAGE plpgsql;
 
 CREATE OR REPLACE FUNCTION action.hold_request_permit_test( pickup_ou INT, request_ou INT, match_item BIGINT, match_user INT, match_requestor INT ) RETURNS SETOF action.matrix_test_result AS $func$
-    SELECT * FROM action.hold_request_permit_test(pickup_ou, request_ou, match_item, match_user, match_requestor, FALSE);
+    SELECT * FROM action.hold_request_permit_test( $1, $2, $3, $4, $5, FALSE );
 $func$ LANGUAGE SQL;
 
 CREATE OR REPLACE FUNCTION action.hold_retarget_permit_test( pickup_ou INT, request_ou INT, match_item BIGINT, match_user INT, match_requestor INT ) RETURNS SETOF action.matrix_test_result AS $func$
-    SELECT * FROM action.hold_request_permit_test(pickup_ou, request_ou, match_item, match_user, match_requestor, TRUE);
+    SELECT * FROM action.hold_request_permit_test( $1, $2, $3, $4, $5, TRUE );
 $func$ LANGUAGE SQL;
 
 COMMIT;