LP1297435: Make 0872 upgrade require less hand holding.
authorJason Stephenson <jstephenson@mvlc.org>
Tue, 25 Mar 2014 17:59:55 +0000 (13:59 -0400)
committerBen Shum <bshum@biblio.org>
Wed, 26 Mar 2014 14:17:23 +0000 (10:17 -0400)
Add a count() around the metabib.remap_metarecord_for_bib call in the
final select statement.  This allows the script to run without the
user having to scroll through rows of output.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/sql/Pg/upgrade/0872.functions.metarecord-deleted-constituents.sql

index b32c4b2..ca92d26 100644 (file)
@@ -345,7 +345,7 @@ END;
 $F$ LANGUAGE PLPGSQL STABLE;
 
 -- Forcibly remap deleted master records, retaining the linkage if so configured.
-SELECT  metabib.remap_metarecord_for_bib( bre.id, bre.fingerprint, TRUE, COALESCE(flag.enabled,FALSE))
+SELECT  count(metabib.remap_metarecord_for_bib( bre.id, bre.fingerprint, TRUE, COALESCE(flag.enabled,FALSE)))
   FROM  metabib.metarecord metar
         JOIN biblio.record_entry bre ON bre.id = metar.master_record,
         config.internal_flag flag