pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedReturning Recordsets from Stored-procs
4+ messages / 4 participants
[nested] [flat]
* Returning Recordsets from Stored-procs
@ 2000-11-06 08:15 Marc Rohloff <Marc.Rohloff@eskom.co.za>
0 siblings, 1 reply; 4+ messages in thread
From: Marc Rohloff @ 2000-11-06 08:15 UTC (permalink / raw)
To: pgsql-sql
Is there anyway to return a recordset from a Stored Procedure in Postgres so that it can be used as a type of view or select?
I know that you can do this in Interbase or MS-SQL.
I have seen that you can return a complete record but that's not really the same thing.
Marc Rohloff
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Returning Recordsets from Stored-procs
@ 2000-11-06 09:39 Grant Finnemore <gaf@ucs.co.za>
parent: Marc Rohloff <Marc.Rohloff@eskom.co.za>
0 siblings, 1 reply; 4+ messages in thread
From: Grant Finnemore @ 2000-11-06 09:39 UTC (permalink / raw)
To: Marc Rohloff <Marc.Rohloff@eskom.co.za>; +Cc: pgsql-sql
Marc,
Marc Rohloff wrote:
> Is there anyway to return a recordset from a Stored Procedure in Postgres so that it can be used as a type of view or select?
In short:-
No, there isn't.
More detail:-
PostgreSQL does not have stored procedures as such, it has user defined functions. The difference being that a stored
procedure returns both a scalar value (the result), and optionally, one or more sets. (your recordset)
Functions on the other hand, only return a scalar value. This has been slightly extended in PostgreSQL so that a list of
values can be returned, but these have to be of the same type, and so are not a general replacement for a set.
Whilst this is an unfortunate position at the moment, it has been my experience that it does not cause insurmountable problems.
(Some short term headaches - yes. ;-)
> I know that you can do this in Interbase or MS-SQL.
>
> I have seen that you can return a complete record but that's not really the same thing.
>
> Marc Rohloff
Regards,
Grant
--
> Poorly planned software requires a genius to write it
> and a hero to use it.
Grant Finnemore BSc(Eng) (mailto:gaf@ucs.co.za)
Software Engineer Universal Computer Services
Tel (+27)(11)712-1366 PO Box 31266 Braamfontein 2017, South Africa
Cell (+27)(82)604-5536 20th Floor, 209 Smit St., Braamfontein
Fax (+27)(11)339-3421 Johannesburg, South Africa
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Returning Recordsets from Stored-procs
@ 2000-11-06 11:10 Andreas Tille <tillea@rki.de>
parent: Grant Finnemore <gaf@ucs.co.za>
0 siblings, 1 reply; 4+ messages in thread
From: Andreas Tille @ 2000-11-06 11:10 UTC (permalink / raw)
To: ; +Cc: pgsql-sql
On Mon, 6 Nov 2000, Grant Finnemore wrote:
> Whilst this is an unfortunate position at the moment, it has been my experience that it does not cause insurmountable problems.
> (Some short term headaches - yes. ;-)
After learning this as a fact you have short term headaches but before
you have continuos headache while trying to port a database.
I think I'm not the only one who would be really, really happy if
*real* stored procedures would be high on top of the todo list.
(In fact this is the *only* thing I'm currently really missing in
PostgreSQL.)
Kind regards
Andreas.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Re: Returning Recordsets from Stored-procs
@ 2000-11-07 15:53 Najm Hashmi <najm@mondo-live.com>
parent: Andreas Tille <tillea@rki.de>
0 siblings, 0 replies; 4+ messages in thread
From: Najm Hashmi @ 2000-11-07 15:53 UTC (permalink / raw)
To: Andreas Tille <tillea@rki.de>; +Cc: pgsql-sql
Andreas Tille wrote:
> On Mon, 6 Nov 2000, Grant Finnemore wrote:
>
> > Whilst this is an unfortunate position at the moment, it has been my experience that it does not cause insurmountable problems.
> > (Some short term headaches - yes. ;-)
> After learning this as a fact you have short term headaches but before
> you have continuos headache while trying to port a database.
> I think I'm not the only one who would be really, really happy if
> *real* stored procedures would be high on top of the todo list.
>
> (In fact this is the *only* thing I'm currently really missing in
> PostgreSQL.)
>
> Kind regards
>
> Andreas.
I will second Andreas........
Najm
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2000-11-07 15:53 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-11-06 08:15 Returning Recordsets from Stored-procs Marc Rohloff <Marc.Rohloff@eskom.co.za>
2000-11-06 09:39 ` Grant Finnemore <gaf@ucs.co.za>
2000-11-06 11:10 ` Andreas Tille <tillea@rki.de>
2000-11-07 15:53 ` Najm Hashmi <najm@mondo-live.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox