Claudio Cicali wrote:
> 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 agree, even if this is a nice hack, it is not the solution we are looking for.
>
>
> - 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 :)
Check our book recommendations at http://www.mysql.com/portal/books/html/index.html
>
>
> - 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.
I believe a solution where you could invoke code/procedures external to the server is
needed and that this mechanism should be fairly independent of how and in which
language
this code is written. There is no reason why you cannot use whatever means this
language
might have to access MySQL. The fact that it was called from within the data base
server
does not change anything. I believe that this mechanism and the embedded stored
procedure
capability fulfills two quite different needs.
>
> 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.
>
I think we might end up with something along those lines.
> 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
Your input is greatly appreciated.
/Arnulf
>
>
> ---------------------------------------------------------------------
> 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
---------------------------------------------------------------------
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