Обсуждение: Executing an SQL query from an internal function...

Поиск
Список
Период
Сортировка

Executing an SQL query from an internal function...

От
"Redefined Horizons"
Дата:
If I am implementing an internal function in PostgreSQL with the C
programming language, can I use one of the C API's to execute a query
from within the function? Is there another way to execute an SQL query
from within an internal function implemented in C?

Thanks,

Scott Huey

Re: Executing an SQL query from an internal function...

От
Alvaro Herrera
Дата:
Redefined Horizons wrote:
> If I am implementing an internal function in PostgreSQL with the C
> programming language, can I use one of the C API's to execute a query
> from within the function? Is there another way to execute an SQL query
> from within an internal function implemented in C?

The SPI interface is designed to do that.

http://www.postgresql.org/docs/8.1/static/spi.html

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.