Re: Receive a record not a tuple - plpgsql

Поиск
Список
Период
Сортировка
От Thomas F. O'Connell
Тема Re: Receive a record not a tuple - plpgsql
Дата
Msg-id 7D3B24F0-256E-4DC7-A32B-75ABEE53D83F@sitening.com
обсуждение исходный текст
Ответ на Receive a record not a tuple - plpgsql  (Flávio Brito <flavio@gral.org.br>)
Список pgsql-admin
On Nov 16, 2005, at 2:21 PM, Flávio Brito wrote:

> How can I call a function into a function? My problem is: I'm
> trying to calculate a tax(inss) over a employer salary. I created a
> function called inss that do it correctly, but when I create
> another one to show more attributes (inss is not a attribute, it is
> calculate over a salary) I receive a record (like {1,Mary,32.45}
> not a tuple. How can I solve it?

Have you looked into set-returning functions? It seems like that
might be what you're looking for:

http://www.postgresql.org/docs/8.1/static/plpgsql-control-
structures.html#PLPGSQL-STATEMENTS-RETURNING

--
Thomas F. O'Connell
Database Architecture and Programming
Co-Founder
Sitening, LLC

http://www.sitening.com/
110 30th Avenue North, Suite 6
Nashville, TN 37203-6320
615-469-5150
615-469-5151 (fax)

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

Предыдущее
От: "Gregory S. Williamson"
Дата:
Сообщение: Re: Server Hardware Configuration
Следующее
От: Enzo D'addario
Дата:
Сообщение: triggers