Re: User defined cast creation

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: "Arun P(dot)L" <arunpl(at)hotmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: User defined cast creation
Date: 2013-07-05 07:40:54
Message-ID: CAFj8pRCPahoNoMTh_CEXdLvZqoyxyCMrnLa_OYvN5B7_ynpRzg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello

2013/7/5 Arun P.L <arunpl(at)hotmail(dot)com>:
> Hi friends,
>
> When I try to create a function which is used in user defined type cast I
> get the following error,
>
> CREATE FUNCTION pg_catalog.text1(integer) RETURNS text STRICT IMMUTABLE
> LANGUAGE SQL AS 'SELECT textin(int4out($1));';
> ERROR: permission denied for schema pg_catalog
>
> I am not trying to create this function as postgres user, but as 'user1'. I
> need to create a user defined cast which uses this function for this
> particular user. I could create functions which doesn't use pg_catalog
> schema as same user.
> What's the issue here? How can I give permission for this user1 or what's
> the right way to create user defined cast for a particular user?
>

only user with superuser rights can create object in pg_catalog schema.

Regards

Pavel Stehule

>
> Thanks in Advance for your help,
>
> Arun~

In response to

Browse pgsql-general by date

  From Date Subject
Next Message sramay 2013-07-05 08:14:19 General Query on Roles - Reg
Previous Message Arun P.L 2013-07-05 07:34:47 User defined cast creation