pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Permission denied for language pltclu
18+ messages / 5 participants
[nested] [flat]

* Permission denied for language pltclu
@ 2005-06-10 07:10 Dinesh Pandey <dpandey@secf.com>
  2005-06-10 07:28 ` Re: [SQL] Permission denied for language pltclu Michael Glaesemann <grzm@myrealbox.com>
  0 siblings, 1 reply; 18+ messages in thread

From: Dinesh Pandey @ 2005-06-10 07:10 UTC (permalink / raw)
  To: pgsql-general@postgresql.org; pgsql-sql

Hi,

 

I am using Postgres-.8.0.1.

 

I am creating a function with 'pltclu' language. I have already created
database with 'pltclu' language. But on creation this function I am getting
this error and failed to create this function

-------------------------

ERROR: Permission denied for language pltclu

-------------------------

What is the cause?

Regards
Dinesh Pandey


----------------------------------------------------------------------------
------
Dinesh Pandey 
Sr. Software Engineer

Second Foundation (India) Pvt. Ltd.
Plot# 52
Industrial Area, Phase II
Chandigarh. (India)
PH: (O) 0172-2639202, Extn: 233 

 

^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: [SQL] Permission denied for language pltclu
  2005-06-10 07:10 Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
@ 2005-06-10 07:28 ` Michael Glaesemann <grzm@myrealbox.com>
  2005-06-10 07:33   ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  0 siblings, 1 reply; 18+ messages in thread

From: Michael Glaesemann @ 2005-06-10 07:28 UTC (permalink / raw)
  To: dpandey@secf.com; +Cc: pgsql-general@postgresql.org; pgsql-sql


On Jun 10, 2005, at 4:10 PM, Dinesh Pandey wrote:
> I am using Postgres-.8.0.1.
>
>
>
> I am creating a function with ‘pltclu’ language. I have already  
> created database with ‘pltclu’language. But on creation this  
> function I am getting this error and failed to create this function
>
> -------------------------
>
> ERROR: Permission denied for language pltclu
>
> -------------------------
>
> What is the cause?

It means that the user you are creating the function as does not have  
permission to use pltclu. Only superusers can create functions using  
untrusted languages.

http://www.postgresql.org/docs/8.0/interactive/pltcl.html

Hope this helps.

Michael Glaesemann
grzm myrealbox com


^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: [SQL] Permission denied for language pltclu
  2005-06-10 07:10 Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 07:28 ` Re: [SQL] Permission denied for language pltclu Michael Glaesemann <grzm@myrealbox.com>
@ 2005-06-10 07:33   ` Dinesh Pandey <dpandey@secf.com>
  2005-06-10 08:28     ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
  0 siblings, 1 reply; 18+ messages in thread

From: Dinesh Pandey @ 2005-06-10 07:33 UTC (permalink / raw)
  To: 'Michael Glaesemann' <grzm@myrealbox.com>; +Cc: pgsql-general@postgresql.org; pgsql-sql

I have installed the Postgres from "postgres" user with pltcl option and
able to create these function with another dbUSER successfully and never get
this error.

 

But our client is getting this error, How to solve it now? Any Idea?

 

 

Thanks

Dinesh Pandey

 

-----Original Message-----
From: Michael Glaesemann [mailto:grzm@myrealbox.com] 
Sent: Friday, June 10, 2005 12:58 PM
To: dpandey@secf.com
Cc: pgsql-general@postgresql.org; 'PostgreSQL'
Subject: Re: [SQL] Permission denied for language pltclu

 

 

On Jun 10, 2005, at 4:10 PM, Dinesh Pandey wrote:

> I am using Postgres-.8.0.1.

> 

> 

> 

> I am creating a function with 'pltclu' language. I have already  

> created database with 'pltclu'language. But on creation this  

> function I am getting this error and failed to create this function

> 

> -------------------------

> 

> ERROR: Permission denied for language pltclu

> 

> -------------------------

> 

> What is the cause?

 

It means that the user you are creating the function as does not have  

permission to use pltclu. Only superusers can create functions using  

untrusted languages.

 

http://www.postgresql.org/docs/8.0/interactive/pltcl.html

 

Hope this helps.

 

Michael Glaesemann

grzm myrealbox com

^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: [SQL] Permission denied for language pltclu
  2005-06-10 07:10 Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 07:28 ` Re: [SQL] Permission denied for language pltclu Michael Glaesemann <grzm@myrealbox.com>
  2005-06-10 07:33   ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
@ 2005-06-10 08:28     ` Richard Huxton <dev@archonet.com>
  2005-06-10 08:38       ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  0 siblings, 1 reply; 18+ messages in thread

From: Richard Huxton @ 2005-06-10 08:28 UTC (permalink / raw)
  To: dpandey@secf.com; +Cc: Michael Glaesemann <grzm@myrealbox.com>; pgsql-sql

Dinesh Pandey wrote:
> I have installed the Postgres from "postgres" user with pltcl option and
> able to create these function with another dbUSER successfully and never get
> this error.
> 
> But our client is getting this error, How to solve it now? Any Idea?

If you created an untrusted function as user "dbUSER" then it was a 
superuser too. Honest.

--
   Richard Huxton
   Archonet Ltd



^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: [SQL] Permission denied for language pltclu
  2005-06-10 07:10 Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 07:28 ` Re: [SQL] Permission denied for language pltclu Michael Glaesemann <grzm@myrealbox.com>
  2005-06-10 07:33   ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 08:28     ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
@ 2005-06-10 08:38       ` Dinesh Pandey <dpandey@secf.com>
  2005-06-10 09:02         ` Re: [SQL] Permission denied for language pltclu Michael Glaesemann <grzm@myrealbox.com>
  2005-06-10 09:11         ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
  0 siblings, 2 replies; 18+ messages in thread

From: Dinesh Pandey @ 2005-06-10 08:38 UTC (permalink / raw)
  To: 'Richard Huxton' <dev@archonet.com>; +Cc: 'Michael Glaesemann' <grzm@myrealbox.com>; pgsql-general@postgresql.org; pgsql-sql


Sorry I didn't get it exactly. Because the same function (send e-mail) I am
able to create at my end, but our client is not able to create it at their
end.

1. Is there some problem in installation?
Or
2. Problem with system user permission executing that database?
OR 
3. Problem With Database user permission?

Now how to change permission of that user to be able to create this
function?

----------------------------
If you created an untrusted function as user "dbUSER" then it was a 
superuser too. Honest.
----------------------------

Thanks
Dinesh





^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: [SQL] Permission denied for language pltclu
  2005-06-10 07:10 Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 07:28 ` Re: [SQL] Permission denied for language pltclu Michael Glaesemann <grzm@myrealbox.com>
  2005-06-10 07:33   ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 08:28     ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
  2005-06-10 08:38       ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
@ 2005-06-10 09:02         ` Michael Glaesemann <grzm@myrealbox.com>
  2005-06-10 09:34           ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  1 sibling, 1 reply; 18+ messages in thread

From: Michael Glaesemann @ 2005-06-10 09:02 UTC (permalink / raw)
  To: dpandey@secf.com; +Cc: pgsql-general <pgsql-general@postgresql.org>; pgsql-sql


On Jun 10, 2005, at 5:38 PM, Dinesh Pandey wrote:

> Sorry I didn't get it exactly. Because the same function (send e- 
> mail) I am
> able to create at my end, but our client is not able to create it  
> at their
> end.
>
> 1. Is there some problem in installation?

No.

> Or
> 2. Problem with system user permission executing that database?

No.

> OR
> 3. Problem With Database user permission?

Only a superuser can create a pltclu function. "dbUSER" must be a  
PostgreSQL superuser if it created the pltclu function. You client  
must use a PostgreSQL superuser to create a pltclu function.

> Now how to change permission of that user to be able to create this
> function?

Make sure the user creating the function is a PostgreSQL superuser.

Michael Glaesemann
grzm myrealbox com



^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: [SQL] Permission denied for language pltclu
  2005-06-10 07:10 Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 07:28 ` Re: [SQL] Permission denied for language pltclu Michael Glaesemann <grzm@myrealbox.com>
  2005-06-10 07:33   ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 08:28     ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
  2005-06-10 08:38       ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 09:02         ` Re: [SQL] Permission denied for language pltclu Michael Glaesemann <grzm@myrealbox.com>
@ 2005-06-10 09:34           ` Dinesh Pandey <dpandey@secf.com>
  0 siblings, 0 replies; 18+ messages in thread

From: Dinesh Pandey @ 2005-06-10 09:34 UTC (permalink / raw)
  To: 'Michael Glaesemann' <grzm@myrealbox.com>; +Cc: 'pgsql-general' <pgsql-general@postgresql.org>; pgsql-sql

> OR

> 3. Problem With Database user permission?

 

Only a superuser can create a pltclu function. "dbUSER" must be a  

PostgreSQL superuser if it created the pltclu function. You client  

must use a PostgreSQL superuser to create a pltclu function.

 

What do mean with super user. The user who has installed the Postgres (like
I have installed it using "Postgres" user) and initialized the pgsql/data?

I am able to create this pltcl function with another "dataman" user but the
same getting failed at out client end.

 

Now pls tell me how to fix it, so that I can tell our client.

 

> Now how to change permission of that user to be able to create this

> function?

 

Make sure the user creating the function is a PostgreSQL superuser.

 

^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: [SQL] Permission denied for language pltclu
  2005-06-10 07:10 Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 07:28 ` Re: [SQL] Permission denied for language pltclu Michael Glaesemann <grzm@myrealbox.com>
  2005-06-10 07:33   ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 08:28     ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
  2005-06-10 08:38       ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
@ 2005-06-10 09:11         ` Richard Huxton <dev@archonet.com>
  2005-06-10 09:51           ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  1 sibling, 1 reply; 18+ messages in thread

From: Richard Huxton @ 2005-06-10 09:11 UTC (permalink / raw)
  To: dpandey@secf.com; +Cc: Michael Glaesemann <grzm@myrealbox.com>; pgsql-sql

Dinesh Pandey wrote:
> Sorry I didn't get it exactly. Because the same function (send e-mail) I am
> able to create at my end, but our client is not able to create it at their
> end.
> 
> 1. Is there some problem in installation?
> 2. Problem with system user permission executing that database?
> 3. Problem With Database user permission?

Number 3 - it is to do with a PostgreSQL user account. That user needs 
to be a superuser.

> Now how to change permission of that user to be able to create this
> function?

A good place to start with this sort of thing is the manuals. In the 7.4 
manuals, I'd start with:
  Ch 36.1. Installing Procedural Languages
  Ch 17.2. User Attributes
  Reference I - the "ALTER USER" command

Note that you may want to make the client's user a superuser just long 
enough to install the language and/or functions.
--
   Richard Huxton
   Archonet Ltd



^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: [SQL] Permission denied for language pltclu
  2005-06-10 07:10 Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 07:28 ` Re: [SQL] Permission denied for language pltclu Michael Glaesemann <grzm@myrealbox.com>
  2005-06-10 07:33   ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 08:28     ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
  2005-06-10 08:38       ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 09:11         ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
@ 2005-06-10 09:51           ` Dinesh Pandey <dpandey@secf.com>
  2005-06-10 10:16             ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
  2005-06-10 10:26             ` Re: [SQL] Permission denied for language pltclu Michael Glaesemann <grzm@myrealbox.com>
  2005-06-10 10:31             ` Re: [SQL] Permission denied for language pltclu Sean Davis <sdavis2@mail.nih.gov>
  2005-06-10 10:37             ` Re: [SQL] Permission denied for language pltclu Tino Wildenhain <tino@wildenhain.de>
  0 siblings, 4 replies; 18+ messages in thread

From: Dinesh Pandey @ 2005-06-10 09:51 UTC (permalink / raw)
  To: 'Richard Huxton' <dev@archonet.com>; +Cc: 'Michael Glaesemann' <grzm@myrealbox.com>; pgsql-general@postgresql.org; pgsql-sql

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

 

Thanks

Dinesh Pandey

 

 

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Richard Huxton
Sent: Friday, June 10, 2005 2:41 PM
To: dpandey@secf.com
Cc: 'Michael Glaesemann'; pgsql-general@postgresql.org; 'PostgreSQL'
Subject: Re: [GENERAL] [SQL] Permission denied for language pltclu

 

Dinesh Pandey wrote:

> Sorry I didn't get it exactly. Because the same function (send e-mail) I
am

> able to create at my end, but our client is not able to create it at their

> end.

> 

> 1. Is there some problem in installation?

> 2. Problem with system user permission executing that database?

> 3. Problem With Database user permission?

 

Number 3 - it is to do with a PostgreSQL user account. That user needs 

to be a superuser.

 

> Now how to change permission of that user to be able to create this

> function?

 

A good place to start with this sort of thing is the manuals. In the 7.4 

manuals, I'd start with:

  Ch 36.1. Installing Procedural Languages

  Ch 17.2. User Attributes

  Reference I - the "ALTER USER" command

 

Note that you may want to make the client's user a superuser just long 

enough to install the language and/or functions.

--

   Richard Huxton

   Archonet Ltd

 

---------------------------(end of broadcast)---------------------------

TIP 4: Don't 'kill -9' the postmaster

^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: [SQL] Permission denied for language pltclu
  2005-06-10 07:10 Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 07:28 ` Re: [SQL] Permission denied for language pltclu Michael Glaesemann <grzm@myrealbox.com>
  2005-06-10 07:33   ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 08:28     ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
  2005-06-10 08:38       ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 09:11         ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
  2005-06-10 09:51           ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
@ 2005-06-10 10:16             ` Richard Huxton <dev@archonet.com>
  2005-06-10 10:45               ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  3 siblings, 1 reply; 18+ messages in thread

From: Richard Huxton @ 2005-06-10 10:16 UTC (permalink / raw)
  To: dpandey@secf.com; +Cc: Michael Glaesemann <grzm@myrealbox.com>; pgsql-sql

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



^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: [SQL] Permission denied for language pltclu
  2005-06-10 07:10 Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 07:28 ` Re: [SQL] Permission denied for language pltclu Michael Glaesemann <grzm@myrealbox.com>
  2005-06-10 07:33   ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 08:28     ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
  2005-06-10 08:38       ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 09:11         ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
  2005-06-10 09:51           ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 10:16             ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
@ 2005-06-10 10:45               ` Dinesh Pandey <dpandey@secf.com>
  2005-06-10 11:10                 ` Re: [SQL] Permission denied for language pltclu Tino Wildenhain <tino@wildenhain.de>
  0 siblings, 1 reply; 18+ messages in thread

From: Dinesh Pandey @ 2005-06-10 10:45 UTC (permalink / raw)
  To: 'Richard Huxton' <dev@archonet.com>; +Cc: 'Michael Glaesemann' <grzm@myrealbox.com>; pgsql-general@postgresql.org; pgsql-sql

In short, a "superuser" is a user who can create other users.

 

But if the user is not super user, he is not allowed to install the language
'plpgsql' and 'pltcl' for database.

 

But my problem was the language is already installed but getting error on
creation of the function.

 

And if any one is creating this function who is not owner of database, this
problem occurs.

 

 

Thanks

Dinesh Pandey

 

^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: [SQL] Permission denied for language pltclu
  2005-06-10 07:10 Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 07:28 ` Re: [SQL] Permission denied for language pltclu Michael Glaesemann <grzm@myrealbox.com>
  2005-06-10 07:33   ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 08:28     ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
  2005-06-10 08:38       ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 09:11         ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
  2005-06-10 09:51           ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 10:16             ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
  2005-06-10 10:45               ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
@ 2005-06-10 11:10                 ` Tino Wildenhain <tino@wildenhain.de>
  0 siblings, 0 replies; 18+ messages in thread

From: Tino Wildenhain @ 2005-06-10 11:10 UTC (permalink / raw)
  To: dpandey@secf.com; +Cc: Richard Huxton <dev@archonet.com>; Michael Glaesemann <grzm@myrealbox.com>; pgsql-sql

Am Freitag, den 10.06.2005, 16:15 +0530 schrieb Dinesh Pandey:
> In short, a "superuser" is a user who can create other users.

> But if the user is not super user, he is not allowed to install the
> language 'plpgsql' and 'pltcl' for database.

> But my problem was the language is already installed but getting error
> on creation of the function.

> And if any one is creating this function who is not owner of database,
> this problem occurs.
> 

No, thats only a coincidence. Check the docs pretty please :-)
And try to send mails to mailinglist in plaintext.

-- 
Tino Wildenhain <tino@wildenhain.de>




^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: [SQL] Permission denied for language pltclu
  2005-06-10 07:10 Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 07:28 ` Re: [SQL] Permission denied for language pltclu Michael Glaesemann <grzm@myrealbox.com>
  2005-06-10 07:33   ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 08:28     ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
  2005-06-10 08:38       ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 09:11         ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
  2005-06-10 09:51           ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
@ 2005-06-10 10:26             ` Michael Glaesemann <grzm@myrealbox.com>
  2005-06-10 10:32               ` Re: [SQL] Permission denied for language pltclu Michael Glaesemann <grzm@myrealbox.com>
  3 siblings, 1 reply; 18+ messages in thread

From: Michael Glaesemann @ 2005-06-10 10:26 UTC (permalink / raw)
  To: dpandey@secf.com; +Cc: pgsql-general <pgsql-general@postgresql.org>; pgsql-sql


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




^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: [SQL] Permission denied for language pltclu
  2005-06-10 07:10 Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 07:28 ` Re: [SQL] Permission denied for language pltclu Michael Glaesemann <grzm@myrealbox.com>
  2005-06-10 07:33   ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 08:28     ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
  2005-06-10 08:38       ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 09:11         ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
  2005-06-10 09:51           ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 10:26             ` Re: [SQL] Permission denied for language pltclu Michael Glaesemann <grzm@myrealbox.com>
@ 2005-06-10 10:32               ` Michael Glaesemann <grzm@myrealbox.com>
  0 siblings, 0 replies; 18+ messages in thread

From: Michael Glaesemann @ 2005-06-10 10:32 UTC (permalink / raw)
  To: ; +Cc: dpandey@secf.com; pgsql-general <pgsql-general@postgresql.org>; pgsql-sql


On Jun 10, 2005, at 7:26 PM, Michael Glaesemann wrote:

>
> 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.


Ach! Should have checked the docs before I mailed. I'm wrong about  
only superusers creating databases. Richard's got it all right. :)

Michael Glaesemann
grzm myrealbox com



^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: [SQL] Permission denied for language pltclu
  2005-06-10 07:10 Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 07:28 ` Re: [SQL] Permission denied for language pltclu Michael Glaesemann <grzm@myrealbox.com>
  2005-06-10 07:33   ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 08:28     ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
  2005-06-10 08:38       ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 09:11         ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
  2005-06-10 09:51           ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
@ 2005-06-10 10:31             ` Sean Davis <sdavis2@mail.nih.gov>
  3 siblings, 0 replies; 18+ messages in thread

From: Sean Davis @ 2005-06-10 10:31 UTC (permalink / raw)
  To: dpandey@secf.com; +Cc: Postgresql-General list <pgsql-general@postgresql.org>


On Jun 10, 2005, at 5:51 AM, 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

Dinesh,

The user creating the function must be a superuser.  The question to 
ask is: How do I make a user a superuser?  The answer is in the 
documentation at these two links.  It suffices to ALTER USER to have 
CREATEUSER privileges to be a superuser.

http://www.postgresql.org/docs/8.0/static/user-attributes.html
http://www.postgresql.org/docs/8.0/static/sql-alteruser.html

I hope this clarifies things a bit.
Sean



^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: [SQL] Permission denied for language pltclu
  2005-06-10 07:10 Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 07:28 ` Re: [SQL] Permission denied for language pltclu Michael Glaesemann <grzm@myrealbox.com>
  2005-06-10 07:33   ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 08:28     ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
  2005-06-10 08:38       ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 09:11         ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
  2005-06-10 09:51           ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
@ 2005-06-10 10:37             ` Tino Wildenhain <tino@wildenhain.de>
  2005-06-10 10:51               ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
  3 siblings, 1 reply; 18+ messages in thread

From: Tino Wildenhain @ 2005-06-10 10:37 UTC (permalink / raw)
  To: dpandey@secf.com; +Cc: Richard Huxton <dev@archonet.com>; Michael Glaesemann <grzm@myrealbox.com>; pgsql-sql

Am Freitag, den 10.06.2005, 15:21 +0530 schrieb Dinesh Pandey:
> 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
> 

No :-) But if you are able to create databases, you are a superuser :-)
And as a superuser you can also create the untrusted functions.

Please read a bit in the documentation - when you manage databases
for a customer you have some responsibilities and should know your
tools.




^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: [SQL] Permission denied for language pltclu
  2005-06-10 07:10 Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 07:28 ` Re: [SQL] Permission denied for language pltclu Michael Glaesemann <grzm@myrealbox.com>
  2005-06-10 07:33   ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 08:28     ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
  2005-06-10 08:38       ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 09:11         ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
  2005-06-10 09:51           ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 10:37             ` Re: [SQL] Permission denied for language pltclu Tino Wildenhain <tino@wildenhain.de>
@ 2005-06-10 10:51               ` Richard Huxton <dev@archonet.com>
  2005-06-10 11:09                 ` Re: [SQL] Permission denied for language pltclu Tino Wildenhain <tino@wildenhain.de>
  0 siblings, 1 reply; 18+ messages in thread

From: Richard Huxton @ 2005-06-10 10:51 UTC (permalink / raw)
  To: Tino Wildenhain <tino@wildenhain.de>; +Cc: dpandey@secf.com, 'Michael Glaesemann' <grzm@myrealbox.com>; pgsql-sql

Tino Wildenhain wrote:
> 
> No :-) But if you are able to create databases, you are a superuser :-)
> And as a superuser you can also create the untrusted functions.

Not quite - if you can create USERS you are a superuser.

-- 
   Richard Huxton
   Archonet Ltd



^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: [SQL] Permission denied for language pltclu
  2005-06-10 07:10 Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 07:28 ` Re: [SQL] Permission denied for language pltclu Michael Glaesemann <grzm@myrealbox.com>
  2005-06-10 07:33   ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 08:28     ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
  2005-06-10 08:38       ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 09:11         ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
  2005-06-10 09:51           ` Re: [SQL] Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
  2005-06-10 10:37             ` Re: [SQL] Permission denied for language pltclu Tino Wildenhain <tino@wildenhain.de>
  2005-06-10 10:51               ` Re: [SQL] Permission denied for language pltclu Richard Huxton <dev@archonet.com>
@ 2005-06-10 11:09                 ` Tino Wildenhain <tino@wildenhain.de>
  0 siblings, 0 replies; 18+ messages in thread

From: Tino Wildenhain @ 2005-06-10 11:09 UTC (permalink / raw)
  To: Richard Huxton <dev@archonet.com>; +Cc: dpandey@secf.com, 'Michael Glaesemann' <grzm@myrealbox.com>; pgsql-sql

Am Freitag, den 10.06.2005, 11:51 +0100 schrieb Richard Huxton:
> Tino Wildenhain wrote:
> > 
> > No :-) But if you are able to create databases, you are a superuser :-)
> > And as a superuser you can also create the untrusted functions.
> 
> Not quite - if you can create USERS you are a superuser.

Yes I finally found out ;)
It was one of these 2 privilegues...

-- 
Tino Wildenhain <tino@wildenhain.de>




^ permalink  raw  reply  [nested|flat] 18+ messages in thread


end of thread, other threads:[~2005-06-10 11:10 UTC | newest]

Thread overview: 18+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-06-10 07:10 Permission denied for language pltclu Dinesh Pandey <dpandey@secf.com>
2005-06-10 07:28 ` Michael Glaesemann <grzm@myrealbox.com>
2005-06-10 07:33   ` Dinesh Pandey <dpandey@secf.com>
2005-06-10 08:28     ` Richard Huxton <dev@archonet.com>
2005-06-10 08:38       ` Dinesh Pandey <dpandey@secf.com>
2005-06-10 09:02         ` Michael Glaesemann <grzm@myrealbox.com>
2005-06-10 09:34           ` Dinesh Pandey <dpandey@secf.com>
2005-06-10 09:11         ` Richard Huxton <dev@archonet.com>
2005-06-10 09:51           ` Dinesh Pandey <dpandey@secf.com>
2005-06-10 10:16             ` Richard Huxton <dev@archonet.com>
2005-06-10 10:45               ` Dinesh Pandey <dpandey@secf.com>
2005-06-10 11:10                 ` Tino Wildenhain <tino@wildenhain.de>
2005-06-10 10:26             ` Michael Glaesemann <grzm@myrealbox.com>
2005-06-10 10:32               ` Michael Glaesemann <grzm@myrealbox.com>
2005-06-10 10:31             ` Sean Davis <sdavis2@mail.nih.gov>
2005-06-10 10:37             ` Tino Wildenhain <tino@wildenhain.de>
2005-06-10 10:51               ` Richard Huxton <dev@archonet.com>
2005-06-10 11:09                 ` Tino Wildenhain <tino@wildenhain.de>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox