]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/sql/Pg/upgrade/0324.schema.usr_visible_circ_copies.sql
Upgrade script numbering for acq order indentifier selector
[working/Evergreen.git] / Open-ILS / src / sql / Pg / upgrade / 0324.schema.usr_visible_circ_copies.sql
1 DROP FUNCTION action.usr_visible_circ_copies( INTEGER ); -- Ignore me if I fail
2
3 BEGIN;
4
5 INSERT INTO config.upgrade_log (version) VALUES ('0324'); 
6
7 -- returns the distinct set of target copy IDs from a user's visible circulation history
8 CREATE OR REPLACE FUNCTION action.usr_visible_circ_copies( INTEGER ) RETURNS SETOF BIGINT AS $$
9     SELECT DISTINCT(target_copy) FROM action.usr_visible_circs($1)
10 $$ LANGUAGE SQL;
11
12 COMMIT;