Re: functions

From: Andrei Popovici <andreipopovici(at)yahoo(dot)com>
To: josh(at)agliodbs(dot)com, pgsql-novice(at)postgresql(dot)org
Subject: Re: functions
Date: 2002-08-26 19:39:52
Message-ID: 20020826193952.30791.qmail@web12807.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)postgresql(dot)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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Josh Berkus 2002-08-26 20:33:52 Re: functions
Previous Message Eft, Aaron 2002-08-26 19:30:24 Alter Table Serial