Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id F28482E4147 for ; Fri, 21 Dec 2007 10:13:38 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 69692-04 for ; Fri, 21 Dec 2007 10:13:34 -0400 (AST) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.190]) by postgresql.org (Postfix) with ESMTP id 74E0E2E40ED for ; Fri, 21 Dec 2007 10:13:34 -0400 (AST) Received: by mu-out-0910.google.com with SMTP id i10so431054mue.5 for ; Fri, 21 Dec 2007 06:13:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=uZX20UmWUziOUcqIIiGjluj0yGyLFoQoikTif3QTZ9o=; b=rZOHT3OKE+wt/YLi0AQbNaV+zQpgppjsDtFVj1ae8LUvUQBOKd0kx+vjzBRF6gWm7pu56xRrH409NoaqkuNtszM6hWvEwlsDPU0SCD7H1cX+ALGpyuRhcCrSZd3d4rtHsx3mFwDBO1NsNtUUUa4/m7U4WO/o9WIHmwBSWhWA/Ss= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=mCQmFezT2xXr3lDJML8pZJ+mU+ZpKtIuP2wzeVJ9ArIqa4idRhFM9EzVS6RwPDo+JZKi6zwaRVaJbdcT+lioBGgX4irBluBI4S0nbUvu/GjH7rpEdLjBPHLqYcB9OAT4rfeISG/8KTJpjUUZIVg4LgGXrRRW5IYDUEeq3U0Vo1A= Received: by 10.78.149.15 with SMTP id w15mr1633693hud.67.1198246412791; Fri, 21 Dec 2007 06:13:32 -0800 (PST) Received: by 10.78.18.2 with HTTP; Fri, 21 Dec 2007 06:13:32 -0800 (PST) Message-ID: Date: Fri, 21 Dec 2007 09:13:32 -0500 From: "Merlin Moncure" To: "Pavel Stehule" Subject: Re: function body actors (was: viewing source code) Cc: "Tom Lane" , "Alvaro Herrera" , "Joshua D. Drake" , "Trevor Talbot" , "Roberts, Jon" , "Kris Jurka" , "Jonah H. Harris" , "Bill Moran" , "pgsql performance" , "Pgsql Hackers" In-Reply-To: <162867790712210018m68117783y791da209a4a97448@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <26811.1198215605@sss.pgh.pa.us> <162867790712210018m68117783y791da209a4a97448@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/341 X-Sequence-Number: 28157 On Dec 21, 2007 3:18 AM, Pavel Stehule wrote: > I have similar patch and it works. There is two isues: > > * we missing column in pg_proc about state (not all procedures are > obfuscated), I solved it for plpgsl with using probin. I was hoping to avoid making any catalog or other changes to support encryption specifically. Maybe your patch stands on its own merits...I missed the original discussion. Do you think the code you wrote can be adapted to do other things besides encryption? > * decrypt is expensive on language handler level. Every session have > to do it again and again, better decrypt in system cache or somewhere > there. Doesn't bother me in the least...and caching unencrypted data is scary. Also, aes256 is pretty fast for what it gives you and function bodies are normally short. The real issue as I see it is where to keep the key. How did you handle that? merlin