From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Ezequiel Tolnay <mail(at)etolnay(dot)com(dot)ar> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Function returning any (tuple) type |
Date: | 2005-07-15 21:21:59 |
Message-ID: | 20050715212159.GA25864@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Jul 15, 2005 at 04:51:04PM +1000, Ezequiel Tolnay wrote:
> Hi, I wonder if anyone can help me find a solution for this problem. I'm
> porting a database from MS SQL Server 2000 to PostgreSQL 8.0.1 (Windows).
<snip>
> The main problem I see is that the funcitions in PostgreSQL seem to be
> always bound to a particular result datatype. Is there a way to
> circumvent this?
Two solutions I can think of:
- Return SETOF RECORD and specify the type on the actual query from the
client
- Return a cursor reference.
Hope this helps,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2005-07-15 21:25:49 | Re: how to insert '\\' in postgres database using java |
Previous Message | Scott Marlowe | 2005-07-15 20:45:51 | Re: How to create unique constraint on NULL columns |