On Sat, Feb 2, 2013 at 11:36 AM, Carlo Stonebanks
<stonec.regis...@sympatico.ca> wrote:
> Here is an advantage Plpgsql has:
> http://www.postgresql.org/docs/9.1/static/plpgsql-expressions.html
>
> I guess you can offset this by creating your own prepared statements in C.
> Otherwise, I can’t think of how C could be slower. I would choose C for
> functions that don’t have SQL statements in them – e.g. math and string
> processing.

For cases involving data processing (SPI calls), C can be slower
because pl/pgsql has a lot of optimizations in it that can be very
easy to miss.  I don't suggest writing backend C functions at all
unless you are trying to interface with a C library to access
functionality currently not exposed in SQL.

merlin


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

Reply via email to