pg: connect, use password

pull/3423/head
Frederico Silva 2020-01-12 19:35:20 +01:00 committed by Alexander Medvednikov
parent f317b65808
commit 2678f9289e
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ fn C.PQexec(voidptr) voidptr
fn C.PQexecParams(voidptr) voidptr fn C.PQexecParams(voidptr) voidptr
pub fn connect(config pg.Config) ?DB { pub fn connect(config pg.Config) ?DB {
conninfo := 'host=$config.host user=$config.user dbname=$config.dbname' conninfo := 'host=$config.host user=$config.user dbname=$config.dbname password=$config.password'
conn := C.PQconnectdb(conninfo.str) conn := C.PQconnectdb(conninfo.str)
status := C.PQstatus(conn) status := C.PQstatus(conn)
println("status=$status") println("status=$status")