Cursors in Functions

Поиск
Список
Период
Сортировка
Искать
От
Dirk Elmendorf
Тема
Cursors in Functions
Дата
Msg-id
XFMail.980812153129.delmendo@cymitar.net
Список
Is there any way to use cursors inside of functions?
I keep trying
CREATE FUNCTION first_purchased_product(int4)
returns text 
as 'BEGIN; DECLARE mycursor cursor for SELECT true from product_order_table where customer
_number= $1 order by sec_last_mod ASC ;fetch 1 in mycursor; END;'
LANGUAGE 'sql';

But it won't let me- I need to get 1 product purchased....Anyone know the best way to acco
mplish this?
_________________________________________________________
Dirk Elmendorf, VP/Development           Main: 210-892-4000
Cymitar Technology Group, Inc.         Direct: 210-892-4005
Lorene Office Plaza                       Fax: 210-892-4329     
9828 Lorene Lane                   
San Antonio, TX 78216-4450           
_________________________________________________________


В списке pgsql-sql по дате отправления
От: Bruce Momjian
Дата:
От: Walt Bigelow
Дата:
FAQ