Re: Stored Procedures

Поиск
Список
Период
Сортировка
От Roberto Mello
Тема Re: Stored Procedures
Дата
Msg-id 20021001190813.GB5383@cc.usu.edu
обсуждение исходный текст
Ответ на Stored Procedures  (bcschnei@attbi.com)
Список pgsql-sql
On Tue, Oct 01, 2002 at 06:16:57PM +0000, bcschnei@attbi.com wrote:
> Hi all. I'm looking for a little help here. I have a 
> project where I have to write some stored proceedures 
> and am having some problems. My main issue is, I cannot 
> figure out how to return a record set containing 
> multipule columns. I am looking for a few examples on 
> how I can do this. Most of what I have to do is fairly 
> simple SQL queries based on a pramater sent to the 
> function. I tried to use the SETOF <datatype> option, 
> but only get back one column.

In 7.2 this is acomplished through returning a cursor from the function.
See the 7.3 documentation to see how to do that (AFAIK, this is not
documented in the 7.2 docs, although it does work).

In 7.3 you can return true record sets without the use of cursors. Again,
see the docs for 7.3 in the developers site.

-Roberto

-- 
+----|        Roberto Mello   -    http://www.brasileiro.net/  |------+
+       Computer Science Graduate Student, Utah State University      +
+       USU Free Software & GNU/Linux Club - http://fslc.usu.edu/     +
Q:    How many IBM CPU's does it take to do a logical right shift?
A:    33.  1 to hold the bits and 32 to push the register.


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

Предыдущее
От: bcschnei@attbi.com
Дата:
Сообщение: Stored Procedures
Следующее
От: "mgeddert"
Дата:
Сообщение: please help with converting a view in oracle into postgresql readably code