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 2B9EB528BF; Fri, 10 Jun 2005 07:20:29 -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 74586-04; Fri, 10 Jun 2005 10:20:20 +0000 (GMT) Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by svr1.postgresql.org (Postfix) with ESMTP id 3E22252869; Fri, 10 Jun 2005 07:20:19 -0300 (ADT) Received: from mainbox.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id 105E840C3DD; Fri, 10 Jun 2005 11:20:15 +0100 (BST) Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id 7F8B615ED7; Fri, 10 Jun 2005 11:16:46 +0100 (BST) Received: from mainbox.archonet.com ([127.0.0.1]) by localhost (mainbox [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 25290-09; Fri, 10 Jun 2005 11:16:43 +0100 (BST) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id C3B2515ED5; Fri, 10 Jun 2005 11:16:43 +0100 (BST) Message-ID: <42A9688B.1000303@archonet.com> Date: Fri, 10 Jun 2005 11:16:43 +0100 From: Richard Huxton User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dpandey@secf.com Cc: 'Michael Glaesemann' , pgsql-general@postgresql.org, 'PostgreSQL' Subject: Re: [SQL] Permission denied for language pltclu References: <20050610095655.0215752956@svr1.postgresql.org> In-Reply-To: <20050610095655.0215752956@svr1.postgresql.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.054 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200506/509 X-Sequence-Number: 79217 Dinesh Pandey wrote: > Hi Richard/ Michael > > Thanks for your great help. > > I got the problem. > > Actually, I was not getting the cause of this problem, because it was > working properly at our end. > > 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 Not quite. Read the chapter on users I mentioned in the manuals. Then, try a "SELECT * FROM pg_user" and look at the "usesuper" column. Then, try "ALTER USER username CREATEUSER" and "ALTER USER username NOCREATEUSER" - see how these affect pg_user. In short, a "superuser" is a user who can create other users. -- Richard Huxton Archonet Ltd