Procedural language implementation questions

From: Michael Robinson <robinson(at)public(dot)bta(dot)net(dot)cn>
To: David Hartwig <daveh(at)insightdist(dot)com>, "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>, Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>, Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Vadim Mikheev <vadim(at)krs(dot)ru>
Subject: Procedural language implementation questions
Date: 1998-08-07 03:05:40
Message-ID: 199808070305.LAA09826@public.bta.net.cn
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

[Sorry, my ISP managed to get itself on the RBL, so hub.org rejects my mail,
and if I send mail to "hackers" mailing list from a different account, it
gets rejected because that account isn't a subscriber to the list. So, I'm
sending this individually.]

I'm looking at implementing a procedural language for postgresql, and I
have a few questions I'd like to get feedback on before I start.

1. First of all, is anybody already working on this? I would like to
avoid duplication of effort, if possible.

2. Looking at the code, it seems that I basically need to do three things:
write a parser (using gram.y as a model), implement code to handle flow-
control nodes in the parse tree for the executor, and write a small bit of
glue for a handler (starting with the stub in "man create_language").
Is this basically correct? Is there anything in these areas that is
particularly fragile that I need to watch out for?

3. I want to use Python as a model, because Python syntax is very simple,
and the semantics are a very good fit with the postgres backend. One
problem I see, though, is that Python is dynamically typed, and looking
at the backend code, it looks like postgres is statically typed. If you
have a Datum, there doesn't seem to be any way to know what's in it.
Comments? Suggestions?

Thanks.

-Michael Robinson

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1998-08-07 03:18:08 Re: Procedural language implementation questions
Previous Message Tatsuo Ishii 1998-08-07 02:55:30 Re: [HACKERS] CVS and the backend