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 db_load_sql_data db_load_sql_data (public) db_get_pgbin db_get_pgbin db_load_sql_data->db_get_pgbin db_source_sql_file db_source_sql_file (public) db_source_sql_file->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

Testcases:
No testcase defined.
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: