On 10/22/2013 9:27 AM, AI Rumman wrote:
I have a libpq C interface code which takes user/password to connect
to the db. Now, I want to call it from a pgsql function where user
will not need to put any user name or password, rather it will use the
current session ID.
How can I do it? Any idea, please.
you shouldn't be calling libpq from within a postgres C function at all.
if you want to make queries on the same database, use the SPI interface,
see http://www.postgresql.org/docs/current/static/spi.html
If you want to connect to another database, use postgres_fdw
--
john r pierce 37N 122W
somewhere on the middle of the left coast
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general