pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert A. Knop Jr. <rknop@lilys.lbl.gov>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: libpq & freeing character results
Date: Tue, 27 Jun 2000 17:36:57 -0400
Message-ID: <14360.962141817@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.10.10006271204130.1921-100000@lilys.lbl.gov>
References: <Pine.LNX.4.10.10006271204130.1921-100000@lilys.lbl.gov>

"Robert A. Knop Jr." <rknop@lilys.lbl.gov> writes:
> If one uses libpq functions such as PQfname, should one free the returned
> character string?

No.  Unless the doc for the function explicitly says you should free
its result, it's a pointer into libpq-managed space.

			regards, tom lane



view thread (3+ messages)

Message-ID: <14360.962141817@sss.pgh.pa.us>
Permalink:  ../14360.962141817@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14360.962141817@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, rknop@lilys.lbl.gov
  Subject: Re: libpq & freeing character results
  In-Reply-To: <14360.962141817@sss.pgh.pa.us>

* 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