From: Jeff Godin <jgodin@tadl.org>
Date: Fri, 24 Nov 2017 15:23:56 +0000 (-0500)
Subject: LP 1768715: Use older named notation in pingest.pl
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ddfa6af287dc9c7fc69f558ab8e7b99ab9df4f15;p=evergreen%2Fjoelewis.git

LP 1768715: Use older named notation in pingest.pl

Use older style param := 'value' named notation for PostgreSQL
function calls in pingest.pl to support PostgreSQL versions < 9.5.

NOTE: This commit was modified to fit with the flow of the surrounding
commits from the master branch of the source repository.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Signed-off-by: Jason Stephenson <jason@sigio.com>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
---

diff --git a/Open-ILS/src/support-scripts/pingest.pl b/Open-ILS/src/support-scripts/pingest.pl
index df96434eab..fac993ce6c 100755
--- a/Open-ILS/src/support-scripts/pingest.pl
+++ b/Open-ILS/src/support-scripts/pingest.pl
@@ -239,7 +239,7 @@ sub browse_ingest {
     } elsif ($pid == 0) {
         my $dbh = DBI->connect("DBI:Pg:database=$db_db;host=$db_host;port=$db_port;application_name=pingest",
                                $db_user, $db_password);
-        my $sth = $dbh->prepare('SELECT metabib.reingest_metabib_field_entries(bib_id => ?, skip_facet => TRUE, skip_browse => FALSE, skip_search => TRUE, skip_display => TRUE)');
+        my $sth = $dbh->prepare('SELECT metabib.reingest_metabib_field_entries(bib_id := ?, skip_facet := TRUE, skip_browse := FALSE, skip_search := TRUE, skip_dispaly := TRUE)');
         foreach (@list) {
             if ($sth->execute($_)) {
                 my $crap = $sth->fetchall_arrayref();
@@ -281,7 +281,7 @@ sub reingest {
 sub reingest_field_entries {
     my $dbh = shift;
     my $list = shift;
-    my $sth = $dbh->prepare('SELECT metabib.reingest_metabib_field_entries(bib_id => ?, skip_facet => ?, skip_browse => TRUE, skip_search => ?, skip_display => ?)');
+    my $sth = $dbh->prepare('SELECT metabib.reingest_metabib_field_entries(bib_id := ?, skip_facet := ?, skip_browse := TRUE, skip_search := ?, skip_display := ?)');
     # Because reingest uses "skip" options we invert the logic of do variables.
     $sth->bind_param(2, ($skip_facets) ? 1 : 0);
     $sth->bind_param(3, ($skip_search) ? 1 : 0);
@@ -301,7 +301,7 @@ sub reingest_attributes {
     my $dbh = shift;
     my $list = shift;
     my $sth = $dbh->prepare(<<END_OF_INGEST
-SELECT metabib.reingest_record_attributes(rid => id, prmarc => marc)
+SELECT metabib.reingest_record_attributes(rid := id, prmarc := marc)
 FROM biblio.record_entry
 WHERE id = ?
 END_OF_INGEST