pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Joel Reed <jreed@support.ddiworld.com>
Cc: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] libpq patch for binding tuples in a result set to user allocated memory
Date: Mon, 14 Feb 2000 10:57:03 -0500
Message-ID: <18990.950543823@sss.pgh.pa.us> (raw)
In-Reply-To: <20000214095958.C8823@support.ddiworld.com>
References: <20000214095958.C8823@support.ddiworld.com>

Joel Reed <jreed@support.ddiworld.com> writes:
> Having been used to being able to bind tuple data from a result set to
> user allocated memory (rather than having to copy the data out of the
> "libpq" like API's buffers to my memory locations) in my days working
> with ODBC, Oracle & SQLServer's C-API, i created the following patch
> which i thought i'd submit. I've included a README as well. 

I do not like this idea very much --- in the first place, it ties the
application far too tightly to internal representational details that
should be private to libpq, and in the second place the implementation
you offer is full of little gotchas like

>   a). construct an array of PGresAttValue's whose size is equal to the
>       number of columns in the result set. if you don't you'll core dump!

I really doubt that avoiding PQgetvalue() calls is worth taking those
kinds of risks and narrowing our options for future reimplementation of
the library and protocol.

In the long run we'll probably be moving to some more-modern interface
design like CORBA, which should help to address performance concerns
like these.

			regards, tom lane



view thread (5+ messages)  latest in thread

Message-ID: <18990.950543823@sss.pgh.pa.us>
Permalink:  ../18990.950543823@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18990.950543823@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, jreed@support.ddiworld.com
  Subject: Re: [INTERFACES] libpq patch for binding tuples in a result set to user allocated memory
  In-Reply-To: <18990.950543823@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