Re: spi and other languages

From: Doug McNaught <doug(at)mcnaught(dot)org>
To: Sibtay Abbas <sibtay_abbas(at)yahoo(dot)com>
Cc: Michael Fuhr <mike(at)fuhr(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: spi and other languages
Date: 2004-12-07 15:37:11
Message-ID: 87fz2i5dco.fsf@asmodeus.mcnaught.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Sibtay Abbas <sibtay_abbas(at)yahoo(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Sullivan 2004-12-07 16:04:03 Re: V8 Beta 5 on AIX
Previous Message Doug McNaught 2004-12-07 15:34:08 Re: how can i add my own procedural language?