X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6ECFC5295A; Fri, 10 Jun 2005 07:27:09 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 72680-10; Fri, 10 Jun 2005 10:27:05 +0000 (GMT) Received: from smtp-send.myrealbox.com (smtp-send.myrealbox.com [192.108.102.143]) by svr1.postgresql.org (Postfix) with ESMTP id D337852945; Fri, 10 Jun 2005 07:27:04 -0300 (ADT) Received: from [61.198.172.99] glaesema [61.198.172.99] by smtp-send.myrealbox.com with NetMail SMTP Agent $Revision: 1.5 $ on Linux via secured & encrypted transport (TLS); Fri, 10 Jun 2005 04:27:05 -0600 In-Reply-To: <20050610095655.0215752956@svr1.postgresql.org> References: <20050610095655.0215752956@svr1.postgresql.org> Mime-Version: 1.0 (Apple Message framework v730) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <77E71A0A-10BF-486F-AE02-B4A697038C6B@myrealbox.com> Cc: pgsql-general , PostgreSQL Content-Transfer-Encoding: 7bit From: Michael Glaesemann Subject: Re: [SQL] Permission denied for language pltclu Date: Fri, 10 Jun 2005 19:26:43 +0900 To: X-Mailer: Apple Mail (2.730) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200506/510 X-Sequence-Number: 79218 On Jun 10, 2005, at 6:51 PM, Dinesh Pandey wrote: > Actually this problem occurs when the function is being created by > the user who has not created the current database. > > > > Solution: The database must be created by the user who is creating > the pltcl function? Right This is a coincidence. Only a PostgreSQL superuser can create a database, so a user who created the database will be a superuser. Only a superuser can create a function with an untrusted language. So, the same superuser can both create a database and create the function using pltclu. However, *any* PostgreSQL superuser should be able to create such a function, regardless of whether they created the database or not. Michael Glaesemann grzm myrealbox com