| From: | Brett McCormick <brett(at)work(dot)chicken(dot)org> | 
|---|---|
| To: | jwieck(at)debis(dot)com (Jan Wieck) | 
| Cc: | vadim(at)sable(dot)krasnoyarsk(dot)su, pgsql-hackers(at)hub(dot)org | 
| Subject: | Re: [HACKERS] rule system, perl and other good stuff | 
| Date: | 1998-02-11 09:38:08 | 
| Message-ID: | 199802110938.BAA30903@abraxas.scene.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
I certainly was.  It should be easy to switch over to using the
dynamic PL mechanism.  I hope to investing some time into it into the
next few weeks to get it up to snuff.  It will accept a package
function or an anonymous sub ref as the AS clause src.  Strings and
integers are passed as scalars, and everything else is passed as a
Postgres::Type.  I was debating whether to make them
Postgres::Type::datetime (to add type-specific methods in .pm files?)
A scalar, array or Postgres::Type can be returned and will be cast
automatically (if need be).
On Wed, 11 February 1998, at 10:25:44, Jan Wieck wrote:
> 
>     Think  so.  Using the dynamic language interface, the handler
>     is called by fmgr_pl() and one of the arguments is the Oid of
>     the  called  PL  function.  So the handler has to do a system
>     cache lookup  on  pg_proc  (at  least  the  first  time  this
>     function is called) to get the prosrc attribute. The AS '...'
>     text on CREATE FUNCTION  will  be  found  there  for  dynamic
>     languages.  It's  handler  specific  what  it expects in this
>     attribute. For PL/Tcl it's the procedures body and it  builds
>     a  Tcl  proc around it after analyzing pg_proc and some other
>     system catalogs. The Tcl proc's name  contains  the  Oid,  so
>     overloading  functions with different parameter types isn't a
>     problem.
> 
>     A few minutes ago I sent down the PL/Tcl  directory  to  this
>     list.  Look at it and reuse anything that might help to build
>     PL/perl.  I really hope that PL/perl and PL/Tcl appear in the
>     6.3 distribution. I'll do whatever I can to make this happen.
> 
> >
> > On Tue, 10 February 1998, at 23:29:39, Brett McCormick wrote:
> >
> > > I don't see CREATE LANGUAGE in the grammar file...  are you asking if
> > > it is strictly compatible or if it uses the dynamic language interface?
> > > there's no reason it shouldn't be compatible..
> > >
> > > On Wed, 11 February 1998, at 14:26:23, Vadim B. Mikheev wrote:
> > >
> > > > One question: is your perl language support compatible with
> > > > new dynamic language interface (CREATE LANGUAGE etc) ?
> > > >
> > > > Vadim
> >
> >
> 
> 
> Until later, Jan
> 
> --
> 
> #======================================================================#
> # It's easier to get forgiveness for being wrong than for being right. #
> # Let's break this rule - forgive me.                                  #
> #======================================== jwieck(at)debis(dot)com (Jan Wieck) #
> 
> 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jan Wieck | 1998-02-11 09:41:27 | Re: [HACKERS] rule system, perl and other good stuff | 
| Previous Message | Michael Meskes | 1998-02-11 09:36:03 | Problem with the numbers I reported yesterday |