Re: Compiling pl/pgsql functions

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: "Rodrigo Sakai" <rodrigo(at)2bfree(dot)com(dot)br>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Compiling pl/pgsql functions
Date: 2004-02-19 19:26:26
Message-ID: 200402191126.26465.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Rodrigo,

> I insist in my question, is there a way to compile the plpgsql codes or
something like that, or its better to think about writting this postgres
functions in C??????

No, there is not. Nor is there likely to be for any PL, as it would add
significant overhead for no real gain.

You have, as I see it, 3 choices:

1) You can give up on code obfuscation and simply provide the functions
normally, and rely on your contracts and copyright law to protect your code.
This is what I do, and I feel pretty strongly that code obfuscation is a dumb
and ineffective way to protect copyright. Personally, I find it hard to
believe that any of my PL/SQL functions (or yours) are so brilliant that they
need trade secret protection.

2) You can write your functions in C and compile them.

3) You can carefully engineer your database permissions so that the user can
have almost full DBA powers without being the superuser, and deny them direct
access to the pg_proc table. This would be a real PITA, though.

--
-Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2004-02-19 19:28:51 Re: DISTINCT ON troubles
Previous Message Joe Conway 2004-02-19 19:00:28 Re: Compiling pl/pgsql functions