From 0184da19c6d0095bb79dd9f46c8f67beefd6db32 Mon Sep 17 00:00:00 2001 From: dbs Date: Thu, 15 Jan 2009 03:16:05 +0000 Subject: [PATCH] Add database port option git-svn-id: svn://svn.open-ils.org/ILS/trunk@11836 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/extras/import/marc2bre.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/extras/import/marc2bre.pl b/Open-ILS/src/extras/import/marc2bre.pl index 7b90dab1c7..76fa5bdb06 100755 --- a/Open-ILS/src/extras/import/marc2bre.pl +++ b/Open-ILS/src/extras/import/marc2bre.pl @@ -25,8 +25,8 @@ use DBI; my ($id_field, $id_subfield, $recid, $user, $config, $idlfile, $marctype, $tcn_offset, $tcn_mapfile, $tcn_dumpfile, $used_id_file, $used_tcn_file, $enc, @files, @trash_fields, @req_fields, $use901, $quiet, $tcn_field, $tcn_subfield) = ('', 'a', 0, 1, '/openils/conf/opensrf_core.xml', '/openils/conf/fm_IDL.xml', 'USMARC', 0); -my ($db_driver,$db_host,$db_name,$db_user,$db_pw) = - ('Pg','localhost','evergreen','postgres','postgres'); +my ($db_driver, $db_host, $db_port, $db_name, $db_user, $db_pw) = + ('Pg', 'localhost', 5432, 'evergreen', 'postgres', 'postgres'); GetOptions( 'marctype=s' => \$marctype, # format of MARC files being processed defaults to USMARC, often set to XML @@ -52,6 +52,7 @@ GetOptions( 'used_tcn_file=s' => \$used_tcn_file, # external file which prevents tcn collisions by specifying tcns already in use in the database, format = one tcn number per line "db_driver=s" => \$db_driver, # database driver type, usually 'Pg' "db_host=s" => \$db_host, # database hostname + "db_port=i" => \$db_port, # database port "db_name=s" => \$db_name, # database name "db_user=s" => \$db_user, # database username "db_pw=s" => \$db_pw, # database password @@ -79,7 +80,7 @@ my @ses; my @req; my %processing_cache; -my $dsn = "dbi:$db_driver:host=$db_host;dbname=$db_name"; +my $dsn = "dbi:$db_driver:host=$db_host;port=$db_port;dbname=$db_name"; if (!$recid) { my $table = 'biblio_record_entry'; -- 2.11.0