Re: When and where do PG invoke PLs module?

Lists: pgsql-hackers
From: _石头 <tanjia76(at)qq(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: When and where do PG invoke PLs module?
Date: 2011-03-21 09:26:56
Message-ID: tencent_50DDAC6056DEA03C51C7CC1C@qq.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hello,
Thank you for reading my question!

Lately,I‘am reading PostgreSQL’s source code! As I understand,the PLs module(such as pl/pgSQL)allow user-defined functions to be writter in other languages.
AS "postgresql-9.0-document.pdf" says :"For a function written in a procedurallanguage, the database server has no built-in knowledge about how to interpret the function’s source text. Instead, the task is passed to a special handler that knows the details of the language.The handler could either do all the work of parsing, syntax analysis, execution, etc. itself, or it could serve as “glue” between PostgreSQL and an existing implementation of a programming language."
I've tried to find when and where do PG invoke PLs module,but failed.There are four procedures for a query string--parer, rewrite,plan and execute. I want to know which part invoke the PLs module,and which function is the entry to do that.

Looking forward for your reply!

from stone.


From: Euler Taveira de Oliveira <euler(at)timbira(dot)com>
To: _ʯͷ <tanjia76(at)qq(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: When and where do PG invoke PLs module?
Date: 2011-03-22 15:22:07
Message-ID: 4D88BE9F.3080705@timbira.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Em 21-03-2011 06:26, _ʯͷ escreveu:
> I've tried to find when and where do PG invoke PLs module,but
> failed.There are four procedures for a query string--parer, rewrite,plan
> and execute. I want to know which part invoke the PLs module,and which
> function is the entry to do that.
>
Look at src/pl/foo and search for foo_call_handler function (it is the entry
point).

--
Euler Taveira de Oliveira
http://www.timbira.com/