Sender: owner-postgres95@postgres.Berkeley.EDU
X-Return-Path: andrew_yu
Received: from localhost.cjs.net (cjs@netcom11.netcom.com [192.100.81.121]) by nobozo.CS.Berkeley.EDU (8.6.10/8.6.3) with ESMTP id SAA00101; Thu, 2 Nov 1995 18:49:28 -0800
Received: (from cjs@localhost) by localhost.cjs.net (8.6.12/8.6.12) id UAA00152; Thu, 2 Nov 1995 20:48:25 -0500
From: "Christopher J. Shaulis" <cjs@netcom.com>
Message-Id: <199511030148.UAA00152@localhost.cjs.net>
Subject: Re: PQclear()
To: mike@ibm4.carb.nist.gov (Mike Tung)
Date: Thu, 2 Nov 1995 20:48:21 -0500 (EST)
Cc: postgres95@postgres.Berkeley.EDU, jolly@postgres.Berkeley.EDU
In-Reply-To: <9511011530.AA19742@ibm4.carb.nist.gov> from "Mike Tung" at Nov 1, 95 10:30:10 am
X-Mailer: ELM [version 2.4 PL24]
Content-Type: text
Content-Length: 661       
Resent-To: postgres95-redist
Resent-Date: Thu, 02 Nov 95 18:49:30 -0800
Resent-From: pglite
Resent-XMts: smtp

> Hi, PQclear() seems buggy. It dumps core all the time.
> Is there anybody to find this? 

Your not imagining things, it really does dump core alot.

Its not mentioned in the manuals, but you should initialize your
Presult* to NULL before you use it. Otherwise it will contain random
values and you will either dump core or screw things up whtn libpq
tries to examine the result structure and free its members. After you
have used it once, PGresult* will have a sane value, and should not
dump core any more.

Another option is to just make sure you use (assign a value to)
PGresult* befrore you call PQclear() on it for the first time.

Have fun,
Christopher

===============================================================================
  To unsubscribe from the Postgres95 mailing list, send mail with the subject
  line "DEL" to "postgres95-request@postgres.Berkeley.EDU". 
============  URL: http://s2k-ftp.CS.Berkeley.EDU:8000/postgres95/  ===========
