Обсуждение: spi and other languages
i guess the answer to my previous question was spi...i
ve got another question, can we call pgsql or plpgsql
functions using spi?
like can we do something like
SPI_execute("CREATE FUNCTION blah() RETURNS Integer
....."....
__________________________________
Do you Yahoo!?
All your favorites on one personal page � Try My Yahoo!
http://my.yahoo.com
On Mon, Dec 06, 2004 at 11:05:28PM -0800, Sibtay Abbas wrote:
> i guess the answer to my previous question was spi...i
> ve got another question, can we call pgsql or plpgsql
> functions using spi?
>
> like can we do something like
>
> SPI_execute("CREATE FUNCTION blah() RETURNS Integer
> ....."....
What happened when you tried it? Are you trying to call a function
or create one?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
i am still in my R&D phase so i ve not yet tried it.
actually i chose the wrong example.
We can call SQL statements like SPI_Execute("SELECT *
FROM sometable") from the spi interface. My question
is that can we enter other procedural languages as
well, like pgplsql statements.
__________________________________
Do you Yahoo!?
Yahoo! Mail - 250MB free storage. Do more. Manage less.
http://info.mail.yahoo.com/mail_250
Sibtay Abbas <sibtay_abbas@yahoo.com> writes:
> We can call SQL statements like SPI_Execute("SELECT *
> FROM sometable") from the spi interface. My question
> is that can we enter other procedural languages as
> well, like pgplsql statements.
You can call a function written in another procedural langauge by
executing a SELECT:
SPI_Execute("SELECT myfunction()")
But you can't execute arbitrary code in other langauges using SPI (of
from the client side, for that matter)--it has to be wrapped up in a
function.
-Doug