Search Postgresql Archives

Re: SQL queries inside a C function?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

you can use a SPI interface

http://www.postgresql.org/docs/9.0/interactive/spi.html

regards

Pavel Stehule

2010/12/26 Elliot Chance <elliotchance@xxxxxxxxx>:
> Hi everyone,
>
> How do I get the active connection handle from inside a C function linked as a PL/pgSQL function, like:
>
> Datum pg_do_something(PG_FUNCTION_ARGS)
> {
> ÂPGconn *conn = ....?
> Â// now do some SELECTs / INSERTs
> ÂPG_RETURN_INT32(result);
> }
>
> Thanks,
> Elliot
> --
> Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux