Tom Lane <tgl@sss.pgh.pa.us> writes:
> Strange. Evidently it's getting as far as opening the connection
> (pq_recvbuf is used in the backend, not the postmaster), but then
> crashing after that. I can't see any reason why it would work for
> pgaccess but not for you. (I notice that pgaccess uses the conninfo
I have an idea an run my test script with wish8.3 and it
works. No core dump. Thats the different between pgaccess
and my script. With tclsh8.3 it dumps core. Looks like a
"bug" in tclsh8.3?
Here my test script.
load libpgtcl.so
proc getDBs { {host "localhost"} {port "5432"} } { # datnames is the list to be result set conn [pg_connect
template1-host $host -port $port] set res [pg_exec $conn "SELECT datname FROM pg_database ORDER BY datname"] set
ntups[pg_result $res -numTuples] return for {set i 0} {$i < $ntups} {incr i} { lappend datnames [pg_result
$res-getTuple $i] } pg_result $res -clear pg_disconnect $conn return $datnames
}
getDBs
Strange because I want to write I server script with tclsh
and not with wish. ;-(
Thanks again
Matthias
--
Matthias Teege -- matthias@mteege.de -- http://emugs.de
make world not war
PGP-Key auf Anfrage