Overhead of Pl/Perl ?

From: Jean-Denis Girard <jd-girard(at)esoft(dot)pf>
To: "pgsql-interfaces(at)postgresql(dot)org" <pgsql-interfaces(at)postgresql(dot)org>
Subject: Overhead of Pl/Perl ?
Date: 2000-06-27 23:53:28
Message-ID: 39593E78.F113B0A6@esoft.pf
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

I would like to know what is the overhead of using Perl versus C in
terms of memory
consumption, speed...

I'm storing usernames / encrypted passords in a table and wrote this
ridiculous Pl/Perl
function:
CREATE FUNCTION "crypt" (text,text )
RETURNS bool AS 'return (crypt($_[0],$_[1]) eq $_[1]) ? 1:0;'
LANGUAGE 'plperl'

in order to do things like:
select * from users where name='foo' and crypt(passwd, 'bar')

This is the only stored procedure I use in the database.
Is there any real life benefit in rewriting the function in C, and
loosing the simplicity of Perl ?

Thanks,
Jean-Denis Girard

Browse pgsql-interfaces by date

  From Date Subject
Next Message Joe Shevland 2000-06-28 03:36:33 RE: Need help getting JDBC setup.
Previous Message JT MacNeil 2000-06-27 22:18:28 ODBC and Visual C++