Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id B3A2A9FC26B for ; Fri, 6 Apr 2007 13:19:30 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 54416-03 for ; Fri, 6 Apr 2007 13:19:12 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from yucaipaco.com (yucaipaco.com [82.165.181.113]) by postgresql.org (Postfix) with ESMTP id 5B7589FC21A for ; Fri, 6 Apr 2007 13:15:36 -0300 (ADT) Received: (qmail 1332 invoked by uid 210); 6 Apr 2007 09:16:08 -0700 Received: from 10.23.112.225 by yucmail (envelope-from , uid 201) with qmail-scanner-1.25st (clamdscan: 0.90/3027. f-prot: 4.6.5/3.16.13. spamassassin: 3.1.8. perlscan: 1.25st. Clear:RC:1(10.23.112.225):. Processed in 0.324418 secs); 06 Apr 2007 16:16:08 -0000 Received: from unknown (HELO ?10.23.112.225?) (yucrelay@10.23.112.225) by yucaipaco.com with ESMTPA; 6 Apr 2007 09:16:07 -0700 Message-ID: <46167241.7020103@yucaipaco.com> Date: Fri, 06 Apr 2007 09:16:01 -0700 From: David Gardner User-Agent: Thunderbird 1.5.0.10 (X11/20070305) MIME-Version: 1.0 To: Doug Thom , pgsql-odbc@postgresql.org Subject: Re: Brio returning data through stored procedures. References: <4615915B.2000305@yucaipaco.com> <46165001.9070608@gmx.net> In-Reply-To: X-Enigmail-Version: 0.94.1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/39 X-Sequence-Number: 8855 Hmm are you doing something like: IF something THEN SELECT * FROM tblOne; ELSE SELECT * FROM tblTwo; Not sure what a refcursor is, but it is mentioned in the docs: http://www.postgresql.org/docs/8.1/interactive/plpgsql-cursors.html Doug Thom wrote: > Hello, David, Andreas, > > Thank you for the suggestions. The challenge is that I need a ref cursor > because it is some arbitrary amount of data coming back from the server > in a cursor. Your suggestion shows a defined row but I do not know what > the row looks like so I cannot define a type beforehand. > > However, your comments have me wondering if there is a different route I > can take. Is there anything that is a 'generic row of data'? I see the > type "record" and I'm going to give that a try. > > Thanks again for the prompt response and ideas! > > -Doug > > -----Original Message----- > From: Andreas [mailto:maps.on@gmx.net] > Sent: Friday, April 06, 2007 9:50 AM > To: pgsql-odbc@postgresql.org > Cc: Doug Thom > Subject: Re: [ODBC] Brio returning data through stored procedures. > > Hi Doug > > I dont know Brio either but keep in mind that tables and views are > allready defined types which you could use here. > > So if your procedure just selects a few rows from a view or table but > should return all collumns from the source you don't have to define a > return type. > > > David Gardner schrieb: >> Never worked with Brio, but have you defined a data-type in pgsql that > >> your function would be returning? Something like: >> >> CREATE TYPE "myType" AS >> ("name" text, >> "start" timestamp without time zone, >> "end" timestamp without time zone, >> error text); >> ALTER TYPE "myType" OWNER TO "me"; >> >> then the function definition would start off like: >> CREATE OR REPLACE FUNCTION "getData"() >> RETURNS SETOF "myType" AS >> ..... > > > > ---------------------------(end of broadcast)--------------------------- > TIP 7: You can help support the PostgreSQL project by donating at > > http://www.postgresql.org/about/donate >