I've got a tour on the web, searching for info and ideas,
regarding the subject to implement some sort of stored procedure in mysql
(remember "Lets approach stored procedure" thread ?)

This was what I discovered

- The Perl "stored procedures" (myperl project) in not a good idea
   at all, but, even if called "poor man's stored procedure", I
   think that this project don't add, actually, stored procedure in
   the precise meamning of term. It add only a binding with Perl via UDF.
   It's a nice (and quite simple) hack.
   Dana Power, I've not take a look to _your_ hack, but I think this
   is the same approach.

- I had searched everywhere the ANSI SQL3 directive... not luck.
   I only found a 1994 document where this directives were "proposed"
   It is quite incomprensile, though (like all "standard doc" I have read :)

- I'm evalueting the IBM DB2 approach.
   Since the ol' COBOL days (rattles...) I remember the EXEC SQL ... END-EXEC
   commands embedded inside the COBOL as the host language.
   At compile time there was a cross-compile step the produced some
   code to get recompiled and finally linked and binded.
   This is also the (old?) informix approach, where SQL EXECs were embedded
   inside the C source, and then a cross-compile (or precompiler) make
   the dirty work, creating another C source that could finally be
   compiled and linked.

But I don't know to have some (low skilled) SQL coders to be well
skilled in some other language to write down a stored procedure.

So here came my idea:

use a SIMPLE language to write the logic of the stored procedure
(no complex structures, definition and use of local variables,
some test statement, error trapping, and of source free SQL coding),
than use a precompiler to convert that source into the source of an UDF.

At last, we had stored procedure written in a simple language,
but compiled and used as UDFs.

MySQL itself could then be used to store the "packaging" approach
(as Oracle does), or other information regarding "validation" of
the sp, last modification time, user... etc

Just some thoughts....

Claudio Cicali

mysql, database, tables


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to