Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 706C1475A88 for ; Fri, 2 Aug 2002 16:07:18 -0400 (EDT) Received: from hawk.mail.pas.earthlink.net (hawk.mail.pas.earthlink.net [207.217.120.22]) by postgresql.org (Postfix) with ESMTP id EC28C4754A5 for ; Fri, 2 Aug 2002 16:07:17 -0400 (EDT) Received: from user-vcaumh5.dsl.mindspring.com ([216.175.90.37] helo=software1.logiplex.internal) by hawk.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 17aihi-0002u8-00 for pgsql-interfaces@postgresql.org; Fri, 02 Aug 2002 13:07:18 -0700 Subject: Re: ECPG and dynamic SQL From: Cliff Wells To: pgsql-interfaces In-Reply-To: <200207292337.g6TNb3rm025336@smtp-server6.tampabay.rr.com> References: <1027981411.2433.30.camel@software1.logiplex.internal> <200207292337.g6TNb3rm025336@smtp-server6.tampabay.rr.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 02 Aug 2002 13:01:43 -0700 Message-Id: <1028318503.5731.18.camel@software1.logiplex.internal> Mime-Version: 1.0 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/15 X-Sequence-Number: 2977 On Mon, 2002-07-29 at 16:37, Jim Parker wrote: > 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 Yeah, I was afraid there was no way to do it using ecpg... oh well. Thanks for the info. > cheers > Jim Parker > > On 29 Jul 2002, Cliff Wells wrote: > > Date: 29 Jul 2002 15:23:30 -0700 > > To: pgsql-interfaces > > From: Cliff Wells > > 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 > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly -- Cliff Wells, Software Engineer Logiplex Corporation (www.logiplex.net) (503) 978-6726 x308 (800) 735-0555 x308