Re: Stored procedures returning rowsets
От | Joe Conway |
---|---|
Тема | Re: Stored procedures returning rowsets |
Дата | |
Msg-id | 3D53E2A4.3080706@joeconway.com обсуждение исходный текст |
Ответ на | Stored procedures returning rowsets (Jarosław Nozderko <jaroslaw.nozderko@polkomtel.com.pl>) |
Список | pgsql-general |
Jarosław Nozderko wrote: > Hi, > > I've searched list archives, but the > problem I'm interested in seems not to > be frequently mentioned. I've read in > 7.3 development doc about table functions. > However, are there any plans to implement > procedures/functions returning arbitrary > rowsets (not only from existing table) > that may be handled without those restrictions, > as well as return code, as it is, for > example, in Sybase ASE ? > I see Neil answered your question, but I'll add to it a bit. If you're looking for something like the way Sybase stored procedures work (I haven't used Sybase but I presume it is similar to MS SQL Server), you won't see it in 7.3, at least. In other words, do you want to do: exec sp_my_proc_name and have it return un arbitrarily formed result set? We have had some discussions regarding that, but decided in favor of table functions because they are much more useful in many ways. You can join them with other tables, and apply selection criteria to their output. And the anonymous composite type feature recently added will improve the flexibility of the table function approach greatly. Also there is a patch waiting to be accepted which will allow the creation of named composite types which are not tables or views. But, I do agree that sometimes the MSSQL/Sybase approach is very useful. Maybe for 7.4 if enough people can be convinced. There have been recent discussions regarding implementing "CREATE PROCEDURE" and "CALL my_procedure" which are steps in this direction. Joe
В списке pgsql-general по дате отправления: