Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 462EA65039D for ; Thu, 31 Jul 2008 16:45:52 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 22514-02-7 for ; Thu, 31 Jul 2008 16:45:43 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail63.csoft.net (leary.csoft.net [205.205.214.5]) by postgresql.org (Postfix) with SMTP id 0068365051E for ; Thu, 31 Jul 2008 16:45:14 -0300 (ADT) Received: (qmail 30926 invoked by uid 1112); 31 Jul 2008 19:45:13 -0000 Date: Thu, 31 Jul 2008 15:45:13 -0400 (EDT) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Alvaro Herrera cc: Tom Lane , pgsql-hackers@postgreSQL.org, pljava-dev@pgfoundry.org Subject: Re: Should creating a new base type require superuser status? In-Reply-To: <20080730220753.GG3977@alvh.no-ip.org> Message-ID: References: <19715.1217447413@sss.pgh.pa.us> <20080730220753.GG3977@alvh.no-ip.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200807/1486 X-Sequence-Number: 121746 On Wed, 30 Jul 2008, Alvaro Herrera wrote: > I think being able to return cstring from a user defined function is > quite dangerous already. I doubt we would ever give that capability to > non-superusers. > > I do agree that creating base types should require a superuser though. > It too seems dangerous just on principle, even if today there's no > actual hole (that we already know of). pl/java already allows non-superusers to create functions returning cstring and base types built off of these functions. It seems safe to me if pl/java is doing the construction of cstring from a user provided java.lang.String. http://wiki.tada.se/display/pljava/Creating+a+Scalar+UDT+in+Java Kris Jurka