Re: Implementing SQL/PSM for PG 8.2

Поиск
Список
Период
Сортировка
От Affan Bin Salman
Тема Re: Implementing SQL/PSM for PG 8.2
Дата
Msg-id 8dfd3d1605062909216e370762@mail.gmail.com
обсуждение исходный текст
Ответ на Implementing SQL/PSM for PG 8.2  ("Denis Lussier" <denis@enterprisedb.com>)
Список pgsql-hackers
Andrew Dunstan wrote:

> It could be done by putting the SPL parser in front of the SQL parser.
> Maybe Luss will tell us how it was done ;-)

We added SPL 'CREATE [OR REPLACE] PROCEDURE' and 'CREATE [OR REPLACE]
FUNCTION' Syntax support to the main scanner, parser for the backend.
By entering exclusive state for scanning the body, similar to quoted
string handling for the PostgreSQL language-agnostic function creation
syntax, we achieve the desired result. We return the scanner to
INITIAL state by encountering the last END token; based upon the block
depth level, that we are keeping track of in the exclusive state.

The rest of the handling, behind the parser, conforms to standard
PostgreSQL Language-agnostic Function creation with all the required
attributes set for
PG_PROC via the CreateFunctionStmt node.

Please note that I am using 'PG_PROC' and 'CreateFunctionStmt' just to
maintain the standard PostgreSQL Reference Point, our implementation
actually differs
in terms of catalog(s), structure(s) naming as we went for
semi-bifurcation between procedures and functions to meet our future
needs. During the process, however, we have ensured full backward
compatibility.

This list of required attributes includes the language to be set as
EDB-SPL (configured as the default PL for EnterpriseDB), in addition
to other attributes
such as parameter(s) information etc.

Subsequently, like for any other PL in PostgreSQL, SPL Language
Handler maintains the responsibility of performing the compilation and
execution of the SPL
proc/function body source text.

-Affan
Lead Database Architect,
EnterpriseDB Corporation.


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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Proposal: associative arrays for plpgsql (concept)
Следующее
От: "Jonah H. Harris"
Дата:
Сообщение: Re: Bytecode and virtual machine