Обсуждение: How can we do STORED PRECEDURE in PostgreSQL?

Поиск
Список
Период
Сортировка

How can we do STORED PRECEDURE in PostgreSQL?

От
"Michael Poon"
Дата:
How can we do STORED PRECEDURE in PostgreSQL?
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


Re: [GENERAL] How can we do STORED PRECEDURE in PostgreSQL?

От
Ed Loehr
Дата:
Michael Poon wrote:
>
> How can we do STORED PRECEDURE in PostgreSQL?

Several options exist (C, SQL, PL/pgSQL...).  For starters, see CREATE
FUNCTION at

    http://www.postgresql.org/docs/postgres/index.html

Cheers,
Ed Loehr

Re: [GENERAL] How can we do STORED PRECEDURE in PostgreSQL?

От
"john huttley"
Дата:
Ed, There is big difference between PG's functions and Stored Procedures,
as they are commonly used.

PG's functions return a single value, Stored Procedures return a record set.

This will require some substantial changes to things like pg_tables, to
support what are effectively
'virtual tables'.  And the trick is to be able to pass parameters to them
and to use them as if they were 'real'.


Enough people have asked about this that it may appear in a later version,
almost certainly not in V7 (afaik)


Regards


>can we do STORED PRECEDURE in PostgreSQL?


> Michael Poon wrote:
> >
> > How can we do STORED PRECEDURE in PostgreSQL?
>
> Several options exist (C, SQL, PL/pgSQL...).  For starters, see CREATE
> FUNCTION at
>
> http://www.postgresql.org/docs/postgres/index.html
>



Re: [GENERAL] How can we do STORED PRECEDURE in PostgreSQL?

От
Ed Loehr
Дата:
john huttley wrote:
>
> Ed, There is big difference between PG's functions and Stored Procedures,
> as they are commonly used.
>
> PG's functions return a single value, Stored Procedures return a record set.

I stand corrected.  A *little* knowledge is a dangerous thing.

Cheers,
Ed Loehr