Re: functions

Поиск
Список
Период
Сортировка
От Andrei Popovici
Тема Re: functions
Дата
Msg-id 20020826193952.30791.qmail@web12807.mail.yahoo.com
обсуждение исходный текст
Ответ на Re: functions  (Josh Berkus <josh@agliodbs.com>)
Ответы Re: functions  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-novice
Thanks, Josh.

I really do not understand the philosophy involved.
Usually the client needs very often this kind of sets.
So, the only way for a client to get them is to issue
hand-made query strings
(e.g. pg_query(cnn, 'SELECT * FROM ...'), in PHP)?
Where are the advantages of pre-compiled code,
execution plans, etc? Probably it will take me some
time to accommodate.

And by the way, MSSQL has also functions. I think they
satisfy your requirements :)


Thanks.
Andrei





Josh Berkus wrote:Andrei,> I understand that the PG
synonym of MS-SQL stored> procedure is the 'function'.
Am I right?> > If so, then is it possible to return a
multi-field,> multi-row set from a function (just the
way a simple> 'select' does in MS-SQL stored
procs)?There is an awkward way of doing this in
Postgres 7.2.1, involving CURSORS. In 7.3, which will
be out in beta sometime soon, it will be possible to
have T-SQL-like row-returning Functions.There is one
other difference btw. Postgres Functions and MSSQL
Procedures; Postgres functions may be called within a
query, and MSSQL procdedures may not. On the other
hand, MSSQL procedures may return multiple result
sets, and I don't think anyone is proposing this for
Postgres.-- -Josh BerkusAglio Database SolutionsSan
Francisco---------------------------(end of
broadcast)---------------------------TIP 3: if
posting/reading through Usenet, please send an
appropriatesubscribe-nomail command to
majordomo@postgresql.org so that yourmessage can get
through to the mailing list cleanly

__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: functions
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: functions