X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 768019FA45F for ; Tue, 4 Jul 2006 22:56:48 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 35804-08 for ; Tue, 4 Jul 2006 22:56:43 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from projects.commandprompt.com (host-130.commandprompt.net [207.173.203.130]) by postgresql.org (Postfix) with ESMTP id 8507A9FA60C for ; Tue, 4 Jul 2006 22:56:43 -0300 (ADT) Received: from [192.168.1.50] (or-67-76-146-141.sta.embarqhsd.net [67.76.146.141]) (authenticated bits=0) by projects.commandprompt.com (8.13.6/8.13.6) with ESMTP id k651uZ6e022609; Tue, 4 Jul 2006 18:56:37 -0700 From: "Joshua D. Drake" Organization: Command Prompt, Inc. To: Tom Lane Subject: Re: Wrap (obfuscate) code Date: Tue, 4 Jul 2006 18:56:51 -0700 User-Agent: KMail/1.9.1 Cc: rdeleonp@gmail.com, rdeleonp@yahoo.com, pgsql-admin@postgresql.org, "Jonah H. Harris" , "Aaron Bono" References: <28774.1152064303@sss.pgh.pa.us> In-Reply-To: <28774.1152064303@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607041856.52276.jd@commandprompt.com> X-Virus-Scanned: ClamAV version 0.88.2, clamav-milter version 0.88.2 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (projects.commandprompt.com [192.168.2.159]); Tue, 04 Jul 2006 18:56:37 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/22 X-Sequence-Number: 22268 On Tuesday 04 July 2006 18:51, Tom Lane wrote: > "Rodrigo De Leon" writes: > > I would be quite a bonus to have equivalent functionality in PG. > > Write your functions in C and give them precompiled libraries. > Yes, also theoretically decompilable, but plenty hard ... plus > they have to come back to you for an update on every major PG > revision ;-) On that note, would it be possible to write a language handler in C that would wrap plPgsql? E.g; Write function in plpgsql, but call plpgsql_o plpgsql_o takes the plpgsql code and turns it into some kind of bytecode. When executed via postgresql, the handler defanges the bytecode and hands it off to plpgsql for proper processing? Just a thought. Joshua D. Drake > > regards, tom lane