pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim Parker <hopeye@cfl.rr.com>
To: Cliff Wells <LogiplexSoftware@earthlink.net>
To: pgsql-interfaces <pgsql-interfaces@postgresql.org>
Subject: Re: ECPG and dynamic SQL
Date: Mon, 29 Jul 2002 19:37:03 -0400
Message-ID: <200207292337.g6TNb3rm025336@smtp-server6.tampabay.rr.com> (raw)
In-Reply-To: <1027981411.2433.30.camel@software1.logiplex.internal>
References: <1027981411.2433.30.camel@software1.logiplex.internal>

The app GtkSQL does what you need, but it is implimented in libpq.  It will
give you a general idea of how to do it.

Do a google search.

There is another app that is similar (libpq also) a little less complex, so
easier to follow, called dbui-0.4.0  A Google search will give you a URL

cheers
Jim Parker

On 29 Jul 2002, Cliff Wells wrote:
> Date: 29 Jul 2002 15:23:30 -0700
> To: pgsql-interfaces <pgsql-interfaces@postgresql.org>
> From: Cliff Wells <LogiplexSoftware@earthlink.net>
> Sender: pgsql-interfaces-owner@postgresql.org
> Subject: [INTERFACES] ECPG and dynamic SQL
> 
> I'm porting an application from a proprietary database format to
> PostgreSQL using ECPG.  My problem is that the application uses a single
> function to get a record from the database.  Based upon which table is
> being accessed, it dynamically calculates column sizes and returns the
> record in a structure.  Creating the query itself is fairly
> straightforward, but I am unable to figure out how to retrieve the
> _results_ of the query as I have no place to store them (since I don't
> know what they will be until the function is called I can't use a EXEC
> SQL DECLARE section).
> 
> It seems Oracle's sqlda would be a possible solution, but I understand
> that isn't implemented in PostgreSQL.
>  
> What is the best way to store the results of a dynamic query without
> knowing what the results will be beforehand (using ECPG, if possible)?  
> 
> I'm using PostgreSQL 7.2.1 on SCO OpenSwerver.
> 
> -- 
> Cliff Wells, Software Engineer
> Logiplex Corporation (www.logiplex.net)
> (503) 978-6726 x308  (800) 735-0555 x308
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org



view thread (5+ messages)  latest in thread

Message-ID: <200207292337.g6TNb3rm025336@smtp-server6.tampabay.rr.com>
Permalink:  ../200207292337.g6TNb3rm025336@smtp-server6.tampabay.rr.com/
Also on:    postgresql.org/message-id/200207292337.g6TNb3rm025336@smtp-server6.tampabay.rr.com

 · 

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: hopeye@cfl.rr.com, LogiplexSoftware@earthlink.net
  Subject: Re: ECPG and dynamic SQL
  In-Reply-To: <200207292337.g6TNb3rm025336@smtp-server6.tampabay.rr.com>

* 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