Search Postgresql Archives

Re: Must be owner of function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 On 07/27/10 3:39 PM, Jerry Richards wrote:
I am using postgresql-odbc and trying to "CREATE OR REPLACE FUNCTION..."
from my C-Application, however, I get "must be owner of function ..." error.
If I execute the command logged in as postgres (i.e. su postgres), then I
can execute the command.  I think I tried to grant privileges to public for
the tables/functions I'm using to no avail.  I also tried to alter function
ownership, but this also gets an error because th function does not exist
yet.

Any help/guidance would be appreciated.

postgres has seperate privileges at the database level (allow you to connect), schema (such as public, allow you to see the schema, allow you to add objects to the schema), and at the object (table, view) level (grant/deny access, grant/deny update, etc).

also, databases and objects have individual ownership.

for simple applications without special security requirements, I create the database owned by the user account that will be managing it, like...

    log in as postgres,
        CREATE USER someuser WITH PASSWORD 'whatever';
        CREATE DATABASE somedb OWNED BY someuser;
    log in as someuser,
        CREATE TABLE ....
        CREATE VIEW ...

etc.



--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux