SQL queries inside a C function? - Mailing list pgsql-general

From Elliot Chance
Subject SQL queries inside a C function?
Date
Msg-id 5B2EF0D2-4B24-43D4-8BCD-96DE53D98AB8@gmail.com
Whole thread Raw
Responses Re: SQL queries inside a C function?  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-general
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

pgsql-general by date:

Previous
From: sunpeng
Date:
Subject: why update is slower on my pc?
Next
From: Pavel Stehule
Date:
Subject: Re: SQL queries inside a C function?