db_get_pgbin (public)

 db_get_pgbin [ -dbn dbn ]

Defined in packages/acs-tcl/tcl/01-database-procs.tcl

PostgreSQL only.

Switches:
-dbn (optional)
The database name to use. If empty_string, uses the default database.
Returns:
the pgbin parameter from the driver section of the first database pool.

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_tcl_exec_optional_dependencies acs_tcl_exec_optional_dependencies (test acs-tcl) db_get_pgbin db_get_pgbin test_acs_tcl_exec_optional_dependencies->db_get_pgbin test_acs_tcl_exec_required_dependencies acs_tcl_exec_required_dependencies (test acs-tcl) test_acs_tcl_exec_required_dependencies->db_get_pgbin db_available_pools db_available_pools (public) db_get_pgbin->db_available_pools util::which util::which (public) db_get_pgbin->util::which _acs_tcl__acs_tcl_external_dependencies_helper _acs_tcl__acs_tcl_external_dependencies_helper (private) _acs_tcl__acs_tcl_external_dependencies_helper->db_get_pgbin db_load_sql_data db_load_sql_data (public) db_load_sql_data->db_get_pgbin db_source_sql_file db_source_sql_file (public) db_source_sql_file->db_get_pgbin

Testcases:
acs_tcl_exec_required_dependencies, acs_tcl_exec_optional_dependencies
Source code:
    #
    # 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]
    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
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: