Index: openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/00-database-procs.tcl,v diff -u -r1.86 -r1.86.2.1 --- openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 12 Aug 2013 21:52:03 -0000 1.86 +++ openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 2 Sep 2013 10:57:09 -0000 1.86.2.1 @@ -2538,19 +2538,16 @@ # patch checked for a blank hostname, which fails in the driver. Arguably the # driver's wrong but a lot of non-OpenACS folks use it, and even though I'm the # maintainer we shouldn't break existing code over such trivialities... + # GN: windows requires $pghost "-h ..." - if { [string equal [db_get_dbhost] "localhost"] || [string equal [db_get_dbhost] ""] } { + if { ([db_get_dbhost] eq "localhost" || [db_get_dbhost] eq "") && $::tcl_platform(platform) ne "windows" } { set pghost "" } else { set pghost "-h [db_get_dbhost]" } - cd [file dirname $file] - if { $::tcl_platform(platform) eq "windows" } { - set fp [open "|[file join [db_get_pgbin] psql] $pghost $pgport $pguser -f $file_name [db_get_database] $pgpass" "r"] - } else { - set fp [open "|[file join [db_get_pgbin] psql] $pghost $pgport $pguser -f $file_name [db_get_database] $pgpass" "r"] - } + #cd [file dirname $file] + set fp [open "|[file join [db_get_pgbin] psql] $pghost $pgport $pguser -f $file [db_get_database] $pgpass" "r"] while { [gets $fp line] >= 0 } { # Don't bother writing out lines which are purely whitespace.