Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 1D1432E35CD for ; Fri, 11 Jan 2008 01:17:56 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 97855-07 for ; Fri, 11 Jan 2008 01:17:49 -0400 (AST) Received: from mail63.csoft.net (leary.csoft.net [205.205.214.5]) by postgresql.org (Postfix) with SMTP id 1F3B72E4BA4 for ; Fri, 11 Jan 2008 01:01:25 -0400 (AST) Received: (qmail 24374 invoked by uid 1112); 11 Jan 2008 05:01:24 -0000 Date: Fri, 11 Jan 2008 00:01:24 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Tom Lane cc: Jan Ischebeck , pgsql-hackers@postgresql.org, pljava-dev@pgfoundry.org Subject: Re: Pl/Java broken since Postgresql 8.3-rc1 In-Reply-To: <7753.1200027031@sss.pgh.pa.us> Message-ID: References: <7753.1200027031@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/381 X-Sequence-Number: 112656 On Thu, 10 Jan 2008, Tom Lane wrote: > Just out of curiosity, what was pljava doing calling SetUserId? > If I'd known about that I'd have thought harder about removing the > function; but it's not clear to me why a PL should be doing that. > pljava wants to run code as the session user when inside a security definer function. The sqlj spec has an install_jar function which installs a library of java code and has an optional deployment descriptor which can create functions against the library and tables for it to use. The install_jar function is security definer to be able to register the jar file in various sqlj tables that the calling user may not be able to write to, but it wants to create the tables and function specified in the deployement descriptor with the ownership of the user calling install_jar, not the person who initially installed pljava. Kris Jurka