[open-ils-commits] r11836 - trunk/Open-ILS/src/extras/import

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Jan 14 22:16:06 EST 2009


Author: dbs
Date: 2009-01-14 22:16:05 -0500 (Wed, 14 Jan 2009)
New Revision: 11836

Modified:
   trunk/Open-ILS/src/extras/import/marc2bre.pl
Log:
Add database port option

Modified: trunk/Open-ILS/src/extras/import/marc2bre.pl
===================================================================
--- trunk/Open-ILS/src/extras/import/marc2bre.pl	2009-01-14 23:56:57 UTC (rev 11835)
+++ trunk/Open-ILS/src/extras/import/marc2bre.pl	2009-01-15 03:16:05 UTC (rev 11836)
@@ -25,8 +25,8 @@
 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 @@
 	'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 @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';



More information about the open-ils-commits mailing list