Re: Functions in Postgres

From: Jan Wieck <janwieck(at)yahoo(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Gordon Clarke <gordonc(at)adf-serials(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Functions in Postgres
Date: 2002-04-12 18:07:32
Message-ID: 200204121807.g3CI7W407276@saturn.janwieck.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Peter Eisentraut wrote:
> Gordon Clarke writes:
>
> > I was asking to see if there was any speed penalty with coding a fn in SQL
> > as opposed to PL/pgsql. It appears that there is and from what you've said
> > PL/pgsql is slightly faster than PL/TCL and probably PL/Perl. Am I correct
> > in drawing that conclusion?
>
> Yes, that seems about right.

I would say it depends pretty much on what that function is
doing. PL/pgSQL is not the best answer to do string
manipulation and such. PL/Tcl can do that alot better, Tcl
has it's own bytecode compiler since 8.0 (if memory serves),
and if the programmer cares, it can cache query plans as
well. As allways

a) Using the right tool for a problem can lead to good
results.

b) A fool with a tool is still a fool.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jan Wieck 2002-04-12 18:16:11 Re: Functions in Postgres
Previous Message Alvaro Herrera 2002-04-12 18:05:03 Re: [SQL] how to get more detailed error messages?