Re: spi and other languages - Mailing list pgsql-hackers

From Doug McNaught
Subject Re: spi and other languages
Date
Msg-id 87fz2i5dco.fsf@asmodeus.mcnaught.org
Whole thread Raw
In response to Re: spi and other languages  (Sibtay Abbas <sibtay_abbas@yahoo.com>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Doug McNaught
Date:
Subject: Re: how can i add my own procedural language?
Next
From: Peter Eisentraut
Date:
Subject: Re: branch for 8.0?