an idea, language SPI - Mailing list pgsql-hackers

From Pavel Stehule
Subject an idea, language SPI
Date
Msg-id 162867790901051045o165e5789n3744f74329406f61@mail.gmail.com
Whole thread Raw
Responses Re: an idea, language SPI  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Andrew Chernow
Date:
Subject: Re: QuickLZ compression algorithm (Re: Inclusion in the PostgreSQL backend for toasting rows)
Next
From: "A.M."
Date:
Subject: Re: QuickLZ compression algorithm (Re: Inclusion in the PostgreSQL backend for toasting rows)