February 17, 2004

mySQL now supports Stored Procedures

This is more for me than anything else. Just came across the fact that mySQL 5.0 now supports stored procedures. (Finally!) It follows the syntax for SQL:2003, but there are plans to consider PL/SQL and T-SQL in the future.

Documentation can be found here.

Perfect timing, as I am just preparing to work on a project that will need that.

Posted by SilverStr at February 17, 2004 09:51 AM | TrackBack
Comments

Take note of what they say... "the MySQL implementation of stored procedures is still in progress"

They also don't discuss things like precompiling, caching, table triggers, and so on.

If you want real database features, I still highly recommend to use PostgreSQL. Be leary of using a brand new major feature in a Beta release, whereas many other databases have had stored procedures & triggers for over 10 years.

Here's the equivalent section from the PostgreSQL documentation on Server Programming.

Posted by: Wim at February 18, 2004 09:56 PM

Yep, already know about PostgreSQL functions. Was looking at the idea of using stored procedures that may in time follow the same syntax as Oracle or SQL Server.

Thanks for the pointer to the docs though. In the future I won't have to hunt it down when reevaluating it.

Posted by: SilverStr at February 18, 2004 10:31 PM

Section 37.11 in the above mentioned documentation and the Pg Techdocs have some good info on porting from Oracle. PL/SQL is very similiar to PL/pgSQL.

I've ported a SQL Server database to PostgreSQL before. Lots of tedious procedure rewriting, although I did create some perl scripts to ease the process.

Posted by: Wim at February 19, 2004 07:03 PM