Re: Compiling pl/pgsql functions - Mailing list pgsql-sql

From Josh Berkus
Subject Re: Compiling pl/pgsql functions
Date
Msg-id 200402191126.26465.josh@agliodbs.com
Whole thread Raw
In response to Re: Compiling pl/pgsql functions  ("Rodrigo Sakai" <rodrigo@2bfree.com.br>)
Responses Re: Compiling pl/pgsql functions
List 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 BerkusAglio Database SolutionsSan Francisco



pgsql-sql by date:

Previous
From: Joe Conway
Date:
Subject: Re: Compiling pl/pgsql functions
Next
From: Josh Berkus
Date:
Subject: Re: DISTINCT ON troubles