Re: pg_connect dumps core - Mailing list pgsql-interfaces

From Matthias Teege
Subject Re: pg_connect dumps core
Date
Msg-id 87hf18r2gw.fsf@moon.mteege.de
Whole thread Raw
In response to pg_connect dumps core  (Matthias Teege <matthias@mteege.de>)
List pgsql-interfaces
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


pgsql-interfaces by date:

Previous
From: Matthias Teege
Date:
Subject: Re: pg_connect dumps core
Next
From: Martin Schild
Date:
Subject: object id