Skip site navigation (1) Skip section navigation (2)

Re: pg_connect dumps core

From: Matthias Teege <matthias(at)mteege(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: pg_connect dumps core
Date: 2001-03-05 09:26:23
Message-ID: 87hf18r2gw.fsf@moon.mteege.de (view raw or flat)
Thread:
Lists: pgsql-interfaces
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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(at)mteege(dot)de -- http://emugs.de
make world not war
PGP-Key auf Anfrage

In response to

Responses

pgsql-interfaces by date

Next:From: Gavin SherryDate: 2001-03-05 09:26:40
Subject: Re: postmaster confiugration and hardware configuration
Previous:From: Matthias TeegeDate: 2001-03-05 06:52:55
Subject: Re: pg_connect dumps core

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group