LP#1497318 - Acknowledgments update Adding Northwest Regional Library System to 2... user/dpearl/history_edit_5
authorJosh Stompro <stomproj@larl.org>
Sun, 20 Sep 2015 15:43:10 +0000 (10:43 -0500)
committerDan Pearl <dpearl@cwmars.org>
Thu, 24 Sep 2015 16:45:04 +0000 (12:45 -0400)
  and Matthew Berowski for typo fixes to 2.8 Release Notes.

Signed-off-by: Josh Stompro <stomproj@larl.org>
Open-ILS/src/sql/Pg/upgrade/XXXX.editable_usr_circ_history.sql

index 420bee2..6303a80 100644 (file)
@@ -3,14 +3,8 @@ BEGIN;
 ALTER TABLE action.circulation 
       ADD COLUMN hide_from_usr_history boolean not null default false;
 
-COMMIT;
-
-BEGIN;
-
 CREATE OR REPLACE FUNCTION action.usr_visible_circs(usr_id integer)
- RETURNS SETOF action.circulation
- LANGUAGE plpgsql
-AS $function$
+ RETURNS SETOF action.circulation AS $function$
 DECLARE
     c               action.circulation%ROWTYPE;
     view_age        INTERVAL;
@@ -44,11 +38,11 @@ BEGIN
                 AND NOT hide_from_usr_history
           ORDER BY xact_start DESC
     LOOP
-RETURN NEXT c;
+       RETURN NEXT c;
     END LOOP;
 
     RETURN;
 END;
-$function$
+$function$ LANGUAGE PLPGSQL;
 
 COMMIT;