Hello,

I am thinking about reimplementation PL/pgPSM, where code should be
shared with PL/pgSQL. I have idea of some middle language, that should
be used for both languages. This language could be based on SPI
interface with some procedural elements (if, jmp, return).

sample

create or replace function sum2(int, int)
returns int as $$
  spi_connect()
  qry = spi_prepare("select $1 + $2", 2, [23,23])
  spi_execute_plan(qry, [$1,$2],N[$1,$2], true, 1)
  RETURN sp_result[0,0]
  spi_finish()
  EXIT
$$ language spi;

what do you thing about it?

regards
Pavel Stehule

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to