Skip site navigation (1) Skip section navigation (2)

Re: ECPG and dynamic SQL

From: Jim Parker <hopeye(at)cfl(dot)rr(dot)com>
To: Cliff Wells <LogiplexSoftware(at)earthlink(dot)net>,pgsql-interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: ECPG and dynamic SQL
Date: 2002-07-29 23:37:03
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
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

Jim Parker

On 29 Jul 2002, Cliff Wells wrote:
> Date: 29 Jul 2002 15:23:30 -0700
> To: pgsql-interfaces <pgsql-interfaces(at)postgresql(dot)org>
> From: Cliff Wells <LogiplexSoftware(at)earthlink(dot)net>
> Sender: pgsql-interfaces-owner(at)postgresql(dot)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 (
> (503) 978-6726 x308  (800) 735-0555 x308
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

In response to


pgsql-interfaces by date

Next:From: Iavor RaytchevDate: 2002-07-29 23:39:55
Subject: Re: PGACCESS connection failure?
Previous:From: Iavor RaytchevDate: 2002-07-29 23:30:43
Subject: Re: PGACCESS connection failure?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group