From 87fe87866c391e86c0df50e7c905f81da4a0a3d4 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Thu, 14 Jun 2012 07:34:12 -0400 Subject: [PATCH] Use bash and the postgres built-in array_agg Signed-off-by: Mike Rylander Signed-off-by: Dan Scott --- Open-ILS/examples/build-eg-replication.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Open-ILS/examples/build-eg-replication.sh b/Open-ILS/examples/build-eg-replication.sh index 83a1134001..8c98ed4188 100755 --- a/Open-ILS/examples/build-eg-replication.sh +++ b/Open-ILS/examples/build-eg-replication.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # Copyright (C) 2009 Equinox Software, Inc. # Author: Mike Rylander @@ -52,7 +52,7 @@ fi if [ "_$TABLES" == "_" ]; then TABLES=$(psql -tc " - select array_to_string(array_accum(table_schema || '.' || table_name),' ') + select array_to_string(array_agg(table_schema || '.' || table_name),' ') from information_schema.tables where table_schema in ( 'acq', 'action', 'action_trigger', 'actor', 'asset', 'asset_hist', 'auditor', @@ -65,7 +65,7 @@ if [ "_$TABLES" == "_" ]; then fi if [ "_$SEQUENCES" == "_" ]; then - SEQUENCES=$(psql -tc "select array_to_string(array_accum(schemaname || '.' || relname),' ') from pg_statio_user_sequences;") + SEQUENCES=$(psql -tc "select array_to_string(array_agg(schemaname || '.' || relname),' ') from pg_statio_user_sequences;") fi -- 2.11.0