Hal Snyder said:
> > Has anyone thought of making use of an embedded scripting package
> >in PostgreSQL? This would be something along the lines of TCL or
> >Guile. I'd lean towards Guile, personally, as it seems the most
> >flexible. Guile is an embeddable Scheme (a dialect of Lisp)
> >interpreter. ...
> Sounds good to me!
>
> > I'm thinking we could intergrate this in with the Postgres parser
> >(and probably the SQL Function managing code) to give us all sorts of
> >new tricks. For instance, this might be a nice, easy, powerful way to
> >implement some of the extensions to SQL that many commericial packages
> >have (ie, variables, loops, conditionals, etc).
> Yes, I think the present parser is far too limited!
> Not sure how hard it would be to hook in Guile, tho.
>
I'm not sure myself. I've yet to actually use Guile in a project, but
from looking it over, it seems it would be a reasonably easy task,
depending mainly upon how deep into the Postgres internals we want to
let it get. The other big question is how difficult it will be to
give Guile (Scheme) a SQL face. I suspect most of this will be
getting the parser to work with Guile. Not quite sure at this point
how it will all interact.
> > What does everyone think of something like this?
> Make it an option (like Apache modules?) so people who hate the idea
> don't have to link it. I like the idea of adding a single tool, one
> that is already known and tested (?), rather than going through the long
> painful develop debug cycle (death of a thousand paper cuts) making ad
> hoc extensions to the parser.
>
Yes, I think it should definately be an option. I expect there are
all sorts of new possibilities that this would allow. The only things
I've really thought about are the new capabilities for the query
language and a new type of interface.
> BTW, regarding embedded SQL, I personally give this a very low priority.
> It just *sounds* intrinsically evil to me - like MS Visual GUIfied
> language tools that generate template code with here-dummy comments
> where you put in your own stuff. Blechh. Just my opinion.
>
Yeah, never really thought much of the idea myself. However, I
understand it is used all over the place, so I suppose we will need to
support it somehow, someway. I suspect embedded SQL will be done via
some C preprocessor. Not quite sure how it will work. But that isn't
really all that related here.
- -Brandon :)
------------------------------