From: David Gardner <david.gardner@yucaipaco.com>
To: Doug Thom <dthom@iagr.net>
To: pgsql-odbc@postgresql.org
Subject: Re: Brio returning data through stored procedures.
Date: Thu, 05 Apr 2007 17:16:27 -0700
Message-ID: <4615915B.2000305@yucaipaco.com> (raw)
In-Reply-To: <A9D51A18173BD043BC843DAFB9CA48EC9A79F4@VMAIL.iagr.net>
References: <A9D51A18173BD043BC843DAFB9CA48EC9A79F4@VMAIL.iagr.net>
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
.....
Doug Thom wrote:
>
> Hello, all,
>
> I am wondering if anybody knows how to return data to Brio through
> ODBC from a function. If you are (or were) an Oracle user you may be
> familiar with defining a ref cursor type and including that as an OUT
> parameter. Brio then picks it up through ODBC and collects the results.
>
> When I tried this in many different ways in Postgres the best I could
> get returned was either “<unnamed portal x>” where x increments for
> the number of times I tried it or what I passed in when I used the
> method that allows me to have the calling procedure name the cursor.
> But no data.
>
> If anybody has run into this challenge I would love to hear if you
> were or were not successful. I’d really like to hear you were
> successful, of course, but if there is no way to do it then there’s no
> point me wasting any more time with it.
>
> Thank you,
>
> -Doug
>
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: david.gardner@yucaipaco.com, dthom@iagr.net
Subject: Re: Brio returning data through stored procedures.
In-Reply-To: <4615915B.2000305@yucaipaco.com>
References: <A9D51A18173BD043BC843DAFB9CA48EC9A79F4@VMAIL.iagr.net> <4615915B.2000305@yucaipaco.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