Re: Function returning any (tuple) type

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Function returning any (tuple) type
Дата
Msg-id 20050715212159.GA25864@svana.org
обсуждение исходный текст
Ответ на Function returning any (tuple) type  (Ezequiel Tolnay <mail@etolnay.com.ar>)
Список 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@svana.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.

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: How to create unique constraint on NULL columns
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: how to insert '\\' in postgres database using java