From: | "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | an idea, language SPI |
Date: | 2009-01-05 18:45:41 |
Message-ID: | 162867790901051045o165e5789n3744f74329406f61@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Gregory Stark | 2009-01-05 19:02:44 | Re: QuickLZ compression algorithm (Re: Inclusion in the PostgreSQL backend for toasting rows) |
Previous Message | Andrew Chernow | 2009-01-05 18:44:57 | Re: QuickLZ compression algorithm (Re: Inclusion in the PostgreSQL backend for toasting rows) |