Re: [GENERAL] Is PL-PGSQL interpreted or complied?

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: [GENERAL] Is PL-PGSQL interpreted or complied?
Дата
Msg-id d6b77880-0988-1bd2-94f0-beffc0f71e92@hogranch.com
обсуждение исходный текст
Ответ на [GENERAL] Is PL-PGSQL interpreted or complied?  (Tim Uckun <timuckun@gmail.com>)
Список pgsql-general
On 7/5/2017 5:10 PM, Tim Uckun wrote:
> I am curious about the stored proc languages inside of postgres. When
> I write a stored proc is it compiled to some internal representation
> or just interpreted?
>

plpgsql is interpreted directly, I don't believe its even pre-tokenized.

> How does this work with other languages?

that varies with the language..  PLJava is compiled to java byte codes
by the javac compiler even before its loaded (as you load the
precompiled .jar file with the pljava loader),   plpython uses .pyc
files, same as if python is run from the command line,  plperl is direct
interpreted, same as perl normally.   embedded C is precompiled to
machine language as you just load the DLL/SO files into postgres.... etc
etc.

> Also would it be possible to extract PL-PGSQL into a standalone
> (albeit crippled) language? Is the interpreter/compiler modular like that?


the interpreter *IS* SQL, which is the whole database server.   I don't
think a standalone plpgsql without SQL would be of much use.


--
john r pierce, recycling bits in santa cruz



В списке pgsql-general по дате отправления:

Предыдущее
От: "Maeldron T."
Дата:
Сообщение: Re: Fwd: [GENERAL] Streaming replication bandwith per table
Следующее
От: "dandl"
Дата:
Сообщение: Re: [GENERAL] Imperative Query Languages