C trigger significantly slower than PL/pgSQL? - Mailing list pgsql-interfaces

From pgchem pgchem
Subject C trigger significantly slower than PL/pgSQL?
Date
Msg-id 607407366.2321178.1681284910101@webmail.strato.de
Whole thread Raw
Responses Re: C trigger significantly slower than PL/pgSQL?  (Dave Cramer <davecramer@postgres.rocks>)
List pgsql-interfaces
Hello all,
 
I have a functionally identical trigger function in PL/pgSQL and C. Now, that the C version is about 3x _slower_ (~1500 vs. ~4500 TPS in pgbench) than PL/pgSQL comes somewhat unexpected.
 
It can very well be, that I made a mistake on the C side, but before everything else, I'd like to ask if this may be expected behavior. Is it plausible that PL/pgSQL is so much faster than C when used in a trigger function?
 
best regards
 
Ernst-Georg
 

pgsql-interfaces by date:

Previous
From: Flaris Feller
Date:
Subject: Re: Transaction control in a C language function
Next
From: Dave Cramer
Date:
Subject: Re: C trigger significantly slower than PL/pgSQL?