pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Matthias Teege <matthias@mteege.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: pg_connect dumps core
Date: 05 Mar 2001 10:26:23 +0100
Message-ID: <87hf18r2gw.fsf@moon.mteege.de> (raw)
References: <200103041334.OAA01945@moon.mteege.de>
	<9431.983723500@sss.pgh.pa.us>

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



view thread (8+ messages)  latest in thread

Message-ID: <87hf18r2gw.fsf@moon.mteege.de>
Permalink:  ../87hf18r2gw.fsf@moon.mteege.de/
Also on:    postgresql.org/message-id/87hf18r2gw.fsf@moon.mteege.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: matthias@mteege.de, tgl@sss.pgh.pa.us
  Subject: Re: pg_connect dumps core
  In-Reply-To: <87hf18r2gw.fsf@moon.mteege.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox