Re: Stored Procedures and Functions

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: Stored Procedures and Functions
Дата
Msg-id 162867790706020925w90942ebh9825bd45d480aa5c@mail.gmail.com
обсуждение исходный текст
Ответ на Stored Procedures and Functions  ("Harpreet Dhaliwal" <harpreet.dhaliwal01@gmail.com>)
Список pgsql-general
Hello

>
> Is it true that postgres doesn't have a notion of Stored Procedures and
> functions is what it has instead?
> RDBMS like Sql Server supports both stored procedures and functions.
> So I was wondering what is the difference between a Stored Procedure and a
> function.
>

It's true. PostgreSQL knows only functions. Difference between
procedures and function are in calling context a possibilities, and
depends on database system. Functions are called from SELECT
statements, procedures are called via statement CALL. On some systems
functions has some limits (it's not true for PostgreSQL). On some
systems procedures allow transaction con troll, returning
multirecordset (unbind selects), and more.

PostgreSQL implementation is more practical than elegant. PostgreSQL
functions hasn't classic limits, but some design points are little bit
dirty. When you start to play with OUT variables, you will see.

For beginner, difference between function and procedure is less than
small in PostgreSQL. There are two families of stored procedures:
Oracle and Microsoft. Look to their documentation.

Regards
Pavel Stehule

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

Предыдущее
От: "Leif B. Kristensen"
Дата:
Сообщение: Re: Stored Procedures and Functions
Следующее
От: PFC
Дата:
Сообщение: Re: Stored Procedures and Functions