Index: openacs-4/packages/acs-tcl/tcl/01-database-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/01-database-procs.tcl,v diff -u -r1.1.2.49 -r1.1.2.50 --- openacs-4/packages/acs-tcl/tcl/01-database-procs.tcl 21 Feb 2023 10:59:22 -0000 1.1.2.49 +++ openacs-4/packages/acs-tcl/tcl/01-database-procs.tcl 20 Apr 2023 15:49:48 -0000 1.1.2.50 @@ -2764,9 +2764,22 @@ @param dbn The database name to use. If empty_string, uses the default database. } { + # + # First, we try to get the postgres folder from the conf. + # set pool [lindex [db_available_pools $dbn] 0] set driver [ns_config "ns/db/pool/$pool" Driver] - return [ns_config "ns/db/driver/$driver" pgbin] + set pgbin [ns_config "ns/db/driver/$driver" pgbin] + + if {$pgbin eq ""} { + # + # When the pgbin conf is missing, we guess the folder from the + # psql location. + # + set pgbin [file dirname [util::which psql]] + } + + return $pgbin }