On Aug 8, 2006, at 8:33 PM, Jeffrey Bigham wrote:


Do you have a reason to use C instead of a higher-level language?

Not really.  Basically I know C decently enough and would have to
learn PL/pgSQL (although it looks pretty easy).  Perl sounds quite
attractive for the added benefit of text-processing as you mention.  I
also have some vague understanding that C might be faster.  I hope I'm
not opening a can-of-worms, but is C actually faster?

It depends on what you're doing. I've found plpgsql to be a better
match for a lot of purposes, as it has a much better "impedance
match" with the database. I'm a happy C hacker, and use C for
PG functions where it seems appropriate, but use plpgsql for
>90% of my in database work. Performance is probably marginally
slower than C, but development time for day-to-day triggers and
functions is a lot faster. Much easier to maintain, too.

Cheers,
  Steve


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to