From ecf5858253c0b5d834ed3fceeefd7cd82284caa8 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Fri, 7 Feb 2014 18:12:10 -0500 Subject: [PATCH] Tweak STRING_AGG() arguments (expects TEXT or BYTEA) Signed-off-by: Dan Scott --- Open-ILS/examples/fm_IDL.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 5d180adbf8..3e829535bf 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -3707,8 +3707,8 @@ SELECT usr, WHEN ( ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day' AND due_date > 'now')) AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE')) - ) THEN id - ELSE 0 + ) THEN id::TEXT + ELSE '0' END ,',') AS out, @@ -3717,14 +3717,14 @@ SELECT usr, WHEN ( ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day' AND due_date < 'now')) AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE')) - ) THEN id - ELSE 0 + ) THEN id::TEXT + ELSE '0' END ,',') AS overdue, - STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END,',') AS lost, - STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END,',') AS claims_returned, - STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END,',') AS long_overdue + STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost, + STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id::TEXT ELSE '0' END,',') AS claims_returned, + STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue FROM action.circulation WHERE checkin_time IS NULL GROUP BY 1 -- 2.11.0