Mikheev, Vadim wrote:
> > > Why is it possible in Oracle' world? -:)
> >
> >     Because of there limited features?
>
> And now we limit our additional advanced features -:)
>
> >     Think  about  a  language like PL/Tcl. At the time you call a
> >     script for execution, you cannot even be sure  that  the  Tcl
> >     bytecode  compiler parsed anything, so how will you ever know
> >     the complete set of objects referenced from this function?
> >
> >     And PL/pgSQL? We don't prepare all the  statements  into  SPI
> >     plans  at  compile  time. We wait until the separate branches
> >     are needed, so how do you know offhand here?
>
> At the time of creation function body could be parsed and referenced
> objects stored in system table (or function could be marked as dirty
> and referenced objects would stored at first compilation and after
> each subsequent successful after-dirtied-compilation).
> Isn't it possible for PL/_ANY_L_ too?

    Nonononono!

    PL/Tcl  is  a very good example for that. To load a function,
    basically a "proc" command is executed in a Tcl  interpreter.
    But  execution  of  Tcl's  "proc"  command  doesn't cause the
    bytecode  compiler  to  kick  in  and  actually   parse   the
    procedures  body.  So  until  the  first  actual  call of the
    function, the Tcl interpreter just holds  a  string  for  the
    body.   Now  a  procedure  body in Tcl is basically a list of
    commands with possible sublists. On call,  only  the  topmost
    level  of this list hierarchy is parsed and compiled, command
    per command. Plus recursively those sublists, needed for this
    invocation.

    You  cannot control Tcl's bytecode compiler from the outside.
    There's no API for that. And Tcl is  a  dynamic  language.  A
    function might execute dynamic code found in some user table?

    Since we don't save bytecode for PL objects,  these  all  are
    IMHO runtime dependencies and most of them could be solved if
    we fix SPI to deal with it correctly.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== [EMAIL PROTECTED] #



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to