Hello
2012/3/21 Robert Haas <robertmhaas@gmail.com>:
> On Wed, Feb 22, 2012 at 4:19 PM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
>> I propose to integrate a PSM language into the core. This language is
>> defined as part of ANSI SQL - SQL/PSM and is used in some well known
>> databases like DB2, Terradata and some other less known RDBMS like
>> MonetDB. A The proposed implementation is based on the same
>> architecture as the current PL/pgSQL interpreter - interpretation of
>> AST with integration of an SQL parser and expression executor. Reasons
>> why to use same architecture are: reuse some parts of interpreter and
>> well experience with the current interpreter.
>
> Why not just enhance PL/pgsql
plpgsql is based on PL/SQL and it is ADA. PSM is relative unique
language - similar to modula with one significant feature - handlers -
so ADA and PSM are different languages with different syntax.
I implemented a few statements from PSM to plpgsql in last years. But
it is a maximum - we cannot change a syntax of declaration, handling
errors or some control statements.
The main issue is different exception handling in these languages - we
cannot to isolate differences just in parser.
Regards
Pavel
http://postgres.cz/wiki/Compound_statement
>
> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company