Re: how can i add my own procedural language?
От | Thomas Hallgren |
---|---|
Тема | Re: how can i add my own procedural language? |
Дата | |
Msg-id | 41B554C4.5000702@mailblocks.com обсуждение исходный текст |
Ответ на | how can i add my own procedural language? (Sibtay Abbas <sibtay_abbas@yahoo.com>) |
Ответы |
Re: how can i add my own procedural language?
|
Список | pgsql-hackers |
Sibtay, > hi > > is "Procedural language handler function" the > interface for adding your own procedural languages to > postgres? > > I ve read the documentation but i am not able to > understand where do we deal with stuff like parse > trees, query trees, plan trees etc. > > Ofcourse any procedural language should pass through > all the steps ie parsing, planning/optimization and > execution. > > so where do we define these steps? and what interface > is provided by postgresql? > You normally don't deal with parsing, planning etc. at all from within a language handler. If you want to know how to issue a SQL query from within a function, a good start is to look at the Server Programming Interface (SPI) . The functions described there are normally the ones your language handler will use to access the database from within the function. http://www.postgresql.org/docs/7.4/interactive/spi.html Take a look at the code for the languages that are bundled with PostgreSQL. In the source tree, you will find them under src/pl. The pltcl.c was very helpful to me when I first did this. Other links where you will find source that might be helpful: http://pgfoundry.org/projects/plperlng http://gborg.postgresql.org/project/pljava Regards, Thomas Hallgren
В списке pgsql-hackers по дате отправления: