vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi All, My company (EnterpriseDB) is very interested in helping to make ANSI-ISO SQL Stored Procedures part of standard BSD Postgres. The SQL/PSM standard is currently used in DB2 and is being implemented in MySQL 5.0. Note that I'm NOT a big fan of adding Oracle compatibility to PL/pgSQL, but, I'm biased in this regard because EnterpriseDB's SPL (Superset Procedural Language) supports Redwood (pl/sql) and Redmond (transact-sql) style programming. For various technical and backward compatibility reasons, I don't think SQL/PSM should be a replacement for PL/pgSQL. Although I do think it should heavily leverage the solid foundation afforded by the PL/pgSQL code base. I think it should start as a separate project on PgFoundry. Once it is working and fully tested and rock solid and proven... I think it should then be considered to become part of the core & installed by default alongside plpgsql. Please note that this is all appropriate for 8.2, because changes to the server side code are necessary to support ANSI stored proc signatures and flexible out/inout parameter passing. EnterpriseDB will publish those suggested server changes for review so that work can begin on plsqlpsm sooner rather than later. What do y'all think?? I believe the first step is for us to create "plsqlpsm" as a BSD project in PgFoundry. --Luss |
| |||
| "Denis Lussier" <denis@enterprisedb.com> writes: > For various technical and backward compatibility reasons, I don't think > SQL/PSM should be a replacement for PL/pgSQL. Although I do think it > should heavily leverage the solid foundation afforded by the PL/pgSQL > code base. "Solid"? I've wanted for quite some time to throw away plpgsql and start over --- there are too many things that need rewritten in it, starting with the parser. This project would be a great place to do that. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend |
| |||
| On Sun, 26 Jun 2005, Tom Lane wrote: > "Denis Lussier" <denis@enterprisedb.com> writes: > > For various technical and backward compatibility reasons, I don't think > > SQL/PSM should be a replacement for PL/pgSQL. Although I do think it > > should heavily leverage the solid foundation afforded by the PL/pgSQL > > code base. > > "Solid"? I've wanted for quite some time to throw away plpgsql and > start over --- there are too many things that need rewritten in it, > starting with the parser. This project would be a great place to do > that. What is wrong on plpgsql code? I see some problems with processing SQL statements, with efectivity evaluation of expr, but parser is clean (in my opinion). what have to be rewriten? Regards Pavel Stehule ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster |
| |||
| Is the intention here to make PSM a first class language (i.e. handled by the main dbengine scanner/parser) of just another PL? If the latter it seems far less worth doing. Doing this as a first class language, however, would be great, just great. As for pgfoundry, I think it's fair to say (from my various perspectives as a pgfoundry admin, owner of a PL project there, and general hacker) that experience is mixed on things that have close backend integration requirements. In particular, I would advise you to conduct pretty much all discussions abou the project on the -hackers list for a project like this. That way you avoid giving anyone surprises, and you will get the best and most wide-ranging advice and feedback. cheers andrew Denis Lussier wrote: >Hi All, > >My company (EnterpriseDB) is very interested in helping to make ANSI-ISO SQL Stored Procedures part of standard BSD Postgres. The SQL/PSM standard is currently used in DB2 and is being implemented in MySQL 5.0. Note that I'm NOT a big fan of adding Oracle compatibility to PL/pgSQL, but, I'm biased in this regard because EnterpriseDB's SPL (Superset Procedural Language) supports Redwood (pl/sql) and Redmond (transact-sql) style programming. > >For various technical and backward compatibility reasons, I don't think SQL/PSM should be a replacement for PL/pgSQL. Although I do think it should heavily leverage the solid foundation afforded by the PL/pgSQL code base. I think it should start as a separate project on PgFoundry. Once it is working and fully tested and rock solid and proven... I think it should then be considered to become part of the core & installed by default alongside plpgsql. > >Please note that this is all appropriate for 8.2, because changes to the server side code are necessary to support ANSI stored proc signatures and flexible out/inout parameter passing. EnterpriseDB will publish those suggested server changes for review so that work can begin on plsqlpsm sooner rather than later. > >What do y'all think?? I believe the first step is for us to create "plsqlpsm" as a BSD project in PgFoundry. > >--Luss > > > > ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) |
| |||
| On Sun, Jun 26, 2005 at 04:44:13PM -0400, Andrew Dunstan wrote: > Is the intention here to make PSM a first class language (i.e. handled > by the main dbengine scanner/parser) of just another PL? If the latter > it seems far less worth doing. Doing this as a first class language, > however, would be great, just great. I've seen some example code on the EnterpriseDB website using their SPL language, and it doesn't seem to be handled like "just another PL". The function body does not look at all like quoted strings, as in our regular PLs. I don't know how they did it, but I don't think they added support for the whole language to the main parser. -- Alvaro Herrera (<alvherre[a]surnet.cl>) "I can't go to a restaurant and order food because I keep looking at the fonts on the menu. Five minutes later I realize that it's also talking about food" (Donald Knuth) ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly |
| |||
| Alvaro Herrera wrote: >On Sun, Jun 26, 2005 at 04:44:13PM -0400, Andrew Dunstan wrote: > > > >>Is the intention here to make PSM a first class language (i.e. handled >>by the main dbengine scanner/parser) of just another PL? If the latter >>it seems far less worth doing. Doing this as a first class language, >>however, would be great, just great. >> >> > >I've seen some example code on the EnterpriseDB website using their SPL >language, and it doesn't seem to be handled like "just another PL". The >function body does not look at all like quoted strings, as in our >regular PLs. I don't know how they did it, but I don't think they added >support for the whole language to the main parser. > > > It could be done by putting the SPL parser in front of the SQL parser. Maybe Luss will tell us how it was done ;-) cheers andrew ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org |
| |||
| On 6/26/2005 4:10 PM, Pavel Stehule wrote: > On Sun, 26 Jun 2005, Tom Lane wrote: > >> "Denis Lussier" <denis@enterprisedb.com> writes: >> > For various technical and backward compatibility reasons, I don't think >> > SQL/PSM should be a replacement for PL/pgSQL. Although I do think it >> > should heavily leverage the solid foundation afforded by the PL/pgSQL >> > code base. >> >> "Solid"? I've wanted for quite some time to throw away plpgsql and >> start over --- there are too many things that need rewritten in it, >> starting with the parser. This project would be a great place to do >> that. > > What is wrong on plpgsql code? I see some problems with processing SQL > statements, with efectivity evaluation of expr, but parser is clean (in my > opinion). The whole parser is a hack that attempts to parse the procedural parts of the function but preserving the SQL parts as query strings while substituting variables with numbered parameters. That is anything but clean. It was the only way I saw at the time of implementation to build a parser that automatically supports future changes of the main Postgres query language. But that doesn't mean that I like the implementation. Jan -- #================================================= =====================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================= = JanWieck@Yahoo.com # ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org |
| |||
| I agree with Jan, As part of my own projects I had to deal with the PL/pgSQL parser. While it was a workable design at the beginning, it now makes some things harder with the quoting etc. Don't get me wrong, I've never really had any beef with PL/pgSQL, it has worked great for a long time but I think it could definitely use a rewrite. I don't recommend discussion for this in this thread, but it could also tie in with the packages support we've discussed and (although some may argue this), compiling the PL to bytecode and using that. -Jonah Jan Wieck wrote: > On 6/26/2005 4:10 PM, Pavel Stehule wrote: > >> On Sun, 26 Jun 2005, Tom Lane wrote: >> >>> "Denis Lussier" <denis@enterprisedb.com> writes: >>> > For various technical and backward compatibility reasons, I don't >>> think >>> > SQL/PSM should be a replacement for PL/pgSQL. Although I do think it >>> > should heavily leverage the solid foundation afforded by the PL/pgSQL >>> > code base. >>> >>> "Solid"? I've wanted for quite some time to throw away plpgsql and >>> start over --- there are too many things that need rewritten in it, >>> starting with the parser. This project would be a great place to do >>> that. >> >> >> What is wrong on plpgsql code? I see some problems with processing >> SQL statements, with efectivity evaluation of expr, but parser is >> clean (in my opinion). > > > The whole parser is a hack that attempts to parse the procedural parts > of the function but preserving the SQL parts as query strings while > substituting variables with numbered parameters. That is anything but > clean. It was the only way I saw at the time of implementation to > build a parser that automatically supports future changes of the main > Postgres query language. But that doesn't mean that I like the > implementation. > > > Jan > ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings |
| |||
| Jonah H. Harris wrote: > I don't recommend discussion for this in this thread, but it could also > tie in with the packages support we've discussed and (although some may > argue this), compiling the PL to bytecode and using that. How would compilation to bytecode help? -Neil ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq |
| ||||
| Jan Wieck wrote: > The whole parser is a hack that attempts to parse the procedural parts > of the function but preserving the SQL parts as query strings while > substituting variables with numbered parameters. That is anything but > clean. It was the only way I saw at the time of implementation to build > a parser that automatically supports future changes of the main Postgres > query language. I agree the current parser is a hack, but it's difficult to see how else it could be implemented. One possibility I've mentioned in the past is to rewrite the main SQL parser by hand (e.g. as a recursive descent parser), so that we could directly call into the main SQL parser from the PL/PgSQL parser. I believe that would let us embed SQL in PL/PgSQL without needing to teach the PL/PgSQL anything about the main SQL grammar. But of course this has the downside of needing to write and maintain a recursive descent parser. Any better ideas? -Neil ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq |