Thread: SQL/PSM implemenation for PostgreSQL (roadmap)

SQL/PSM implemenation for PostgreSQL (roadmap)

From
"Pavel Stehule"
Date:
Hello,

I am work on implementation of SQL/PSM language for PostgreSQL. You can see 
first results on http://postgresql.interweb.cz/index.php/SQL/PSM . My goal 
is creating of referential implementation and using it mainly for education 
and colecting informations about language (documentation, regress tests, 
...). Implementation is based on plpgsql runtime. I haven't necessary 
knowleages for total rewriting any language runtime, and current runtime is 
sufficient for my goals. I don't belive so rewriting runtime can has 
adequate benefit. Runtime can be lighter and cleaner only with some support 
in core. It's reason so this project is external pgfoundry project.

This implementation has PostgreSQL specific. Don't support procedures and 
CALL statement. Don't support unbounded SELECTs. Don't support NOT ATOMIC 
block. More on
http://postgresql.interweb.cz/index.php/SQL/PSM

Roadmap: * implement completed functionality (two weeks) * testing and cleaning (regress tests) (february) *
documentation(april)
 

I welcome any helpers, help, testers, suggestions, notes and comments.

Best regards
Pavel Stehule

_________________________________________________________________
Citite se osamele? Poznejte nekoho vyjmecneho diky Match.com. 
http://www.msn.cz/



Re: SQL/PSM implemenation for PostgreSQL (roadmap)

From
Peter Eisentraut
Date:
Am Montag, 4. Dezember 2006 13:09 schrieb Pavel Stehule:
> I am work on implementation of SQL/PSM language for PostgreSQL.

Do you have an analysis of the differences between PL/pgSQL and SQL/PSM?  It 
seems they might be variants of the same language rather than separate 
implementations, but no one knows for sure.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


Re: SQL/PSM implemenation for PostgreSQL (roadmap)

From
"Jonah H. Harris"
Date:
On 12/4/06, Pavel Stehule <pavel.stehule@hotmail.com> wrote:
> I am work on implementation of SQL/PSM language for PostgreSQL.

Pavel,

I'd be glad to help ya on it.  If you could let me know what you'd
like me to work on, I'd be glad to start.

-- 
Jonah H. Harris, Software Architect | phone: 732.331.1324
EnterpriseDB Corporation            | fax: 732.331.1301
33 Wood Ave S, 3rd Floor            | jharris@enterprisedb.com
Iselin, New Jersey 08830            | http://www.enterprisedb.com/


Re: SQL/PSM implemenation for PostgreSQL (roadmap)

From
"Pavel Stehule"
Date:
>Am Montag, 4. Dezember 2006 13:09 schrieb Pavel Stehule:
> > I am work on implementation of SQL/PSM language for PostgreSQL.
>
>Do you have an analysis of the differences between PL/pgSQL and SQL/PSM?  
>It
>seems they might be variants of the same language rather than separate
>implementations, but no one knows for sure.

Some changes are cosmetic, and some not. You can see on current sql/psm 
runtime rewriting gram.y and minimal changes in other files. But this 
languages are really different. The mayor difference is in exception 
handling. The idea is total different.

Individual chapter is sql/psm procedures and unbounded select. SQL/PSM 
propably don't need it, but current implementations support it. This has 
deeper reasons, one is different concept of return output sets in Oracle and 
Sybase based databases. I like this concept (unbounded selects) but it isn't 
part of sql/psm and it isn't current topic.

What I had to solve. In sql/psm is sqlstate more important and designates 
level of error. In Postgresql sqlstate and error level are independent. 
Next, I can solve exception and warnings in sql/psm 3 diffirent ways. 
PostgreSQL and (PL/SQL) can handle only exception in one way. I belive so 
some procedures, can be shared, but current runtime use global variables 
which break sharing.

Other are similar (semantic), but s syntax is total different. Please, see 
syntax for declare variables. I don't know history about SQL/PSM (know it 
anybody?) and I don't know why is sql/psm different from pl/sql. Older 
version of sql/psm was similar to oracle's language.

Every RDBMS supports only subset of SQL/PSM (some parts are unspecified). 
Its main goal for me for now - create referential implementation. Next steps 
are far. You can belive, I can spent long time in searching of any sources 
for sql/psm. One is only and it is ISO/IEC 9075-4.

Best regards

Pavel Stehule

_________________________________________________________________
Najdete si svou lasku a nove pratele na Match.com. http://www.msn.cz/



Re: SQL/PSM implemenation for PostgreSQL (roadmap)

From
"Pavel Stehule"
Date:
>On 12/4/06, Pavel Stehule <pavel.stehule@hotmail.com> wrote:
>>I am work on implementation of SQL/PSM language for PostgreSQL.
>
>Pavel,
>
>I'd be glad to help ya on it.  If you could let me know what you'd
>like me to work on, I'd be glad to start.
>

Nice, thank you. I plan so in next week finish prototype on 80% (all 
important, moustly error handling). Then you can clean and synchronise code 
with me (gram.y use sql/psm domain names and others still pl/pgsql names).

I am not able write documentation (my english is really stupid). Please, if 
you can, work on it. And, please, read and correct wiki 
(http://postgresql.interweb.cz/index.php/SQL/PSM ). I inwite any notes to 
implementation sql/psm in postgresql environment.

What is your pgfoundry account? Next talks can be on 
plpsm-devel.pgfoundry.org or via ICQ: 138 051 654

Regards
Pavel Stehule

_________________________________________________________________
Emotikony a pozadi programu MSN Messenger ozivi vasi konverzaci. 
http://messenger.msn.cz/



Re: SQL/PSM implemenation for PostgreSQL (roadmap)

From
Josh Berkus
Date:
Pavel,

> I am not able write documentation (my english is really stupid). Please, 
> if you can, work on it. And, please, read and correct wiki 
> (http://postgresql.interweb.cz/index.php/SQL/PSM ). I inwite any notes 
> to implementation sql/psm in postgresql environment.

I'd suggest writing documentation in Czech and getting it translated. 
We probably have more translators than people who know anything about 
PSM.  A lot of the Sun database team is Czech; I can ask if they want to 
help.

--Josh


Re: SQL/PSM implemenation for PostgreSQL (roadmap)

From
"Pavel Stehule"
Date:
>I am not able write documentation (my english is really stupid).
>>Please, if you can, work on it. And, please, read and correct wiki 
>>(http://postgresql.interweb.cz/index.php/SQL/PSM ). I inwite any notes to 
>>implementation sql/psm in postgresql environment.
>
>I'd suggest writing documentation in Czech and getting it translated. We 
>probably have more translators than people who know anything about PSM.  A 
>lot of the Sun database team is Czech; I can ask if they want to help.
>

It's good idea. Thank You

Pavel

_________________________________________________________________
Chcete sdilet sve obrazky a hudbu s prateli? http://messenger.msn.cz/



SQL/PSM prototype is available

From
"Pavel Stehule"
Date:
Hello,

Now, you can test prototype or work on it. All details are on 
http://postgresql.interweb.cz/index.php/SQL/PSM
. This version needs patched core files 
http://postgresql.interweb.cz/index.php/SQL/PSM#Patches_for_core
You can find supported functionality on 
http://postgresql.interweb.cz/index.php/SQL/PSM#Supported_statements .

Next week I should work on "for" and "get diagnostic" stmts implementation. 
There is a lot of work (please see ToDo and Errors sections). It's can be 
success if in you plpgpsm interpret will run. I plan take full functionality 
first and clean and refactorise source  code later.

Dificult part is exception handling :-(, because all postgresql stored 
rutines have to run under transaction, which standard doesn't expect.

Please, use code from CVS.

Best regards
Pavel Stehule

_________________________________________________________________
Emotikony a pozadi programu MSN Messenger ozivi vasi konverzaci. 
http://messenger.msn.cz/



Re: SQL/PSM prototype is available

From
"Jonah H. Harris"
Date:
On 12/17/06, Pavel Stehule <pavel.stehule@hotmail.com> wrote:
> Now, you can test prototype or work on it.

Cool.  Good work Pavel.  I'll play with it and some of my PSM code.
I'll try and contact you via IM as to things I'd like to help with.


-- 
Jonah H. Harris, Software Architect | phone: 732.331.1324
EnterpriseDB Corporation            | fax: 732.331.1301
33 Wood Ave S, 3rd Floor            | jharris@enterprisedb.com
Iselin, New Jersey 08830            | http://www.enterprisedb.com/