On 8/8/06, Jeffrey Bigham <[EMAIL PROTECTED]> wrote:
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?

IMO, pl/pgsql should be the first sp language you learn and the
primary language of development for strored procedures.  It is simply
better than most other pl languages for data processing and ease of
maitenance.

There are two reasons why you might want to use C: one is that you
might want to interface with a C library and make it callable from
SQL.  You should check out Magnus Hagander's integration of OpenLDAP
for a good example of this (check his blog).  Note that  Magnus who is
in my opinion an expert C programmer only did this after trying ther
perl implementation and finding it unworkable.

another reason to use C is to expose some database internals.  for
example, in C you can invoke a function by it's oid which is currently
impossible to do in sql/plpgsql without some serious acrobatics.

Aside from that, I would avoid.  One of the reasons databases were
invented was so we don't have to use C for data processing (or COBOL,
etc.), or at least not until the hard work has already been done.

merlin

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org

Reply via email to