Обсуждение: Urgent - Grant
People of world, help help please. I created a DB with super-user postgres, I give all privileges to DB (banco is my DB) GRANT ALL ON DATABASE banco TO PUBLIC; GRANT CREATE ON DATABASE banco TO PUBLIC But other users can't create tables in this DB ERROR: banco=> create table tabla (x integer); NOTICE: CREATE TABLE / UNIQUE will create implicit index "tabla_oid_idx" for table "tabla" *ERROR: must be owner of relation tabla* banco=> But they can use select,update,delete What happen? What must to do? Thanks, thanks...
am Tue, dem 18.11.2008, um 11:25:16 -0300 mailte Gustavo Rosso folgendes: > People of world, help help please. > I created a DB with super-user postgres, I give all privileges to DB > (banco is my DB) > GRANT ALL ON DATABASE banco TO PUBLIC; > GRANT CREATE ON DATABASE banco TO PUBLIC > > But other users can't create tables in this DB > ERROR: > banco=> create table tabla (x integer); > NOTICE: CREATE TABLE / UNIQUE will create implicit index > "tabla_oid_idx" for table "tabla" > *ERROR: must be owner of relation tabla* > banco=> Which version? Apparently very old, since OID are deprecated for a long time. I can't reproduce your problem: test=# create user foo; CREATE ROLE test=# GRANT ALL ON DATABASE test to public; GRANT test=# GRANT CREATE ON DATABASE test to public; GRANT test=# \q kretschmer@apache-new:~$ psql-dev -U foo test psql (8.4devel) Type "help" for help. test=> select current_user; current_user -------------- foo (1 row) test=> create table tabla (x integer); CREATE TABLE test=> create table tablb (x integer primary key); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "tablb_pkey" for table "tablb" CREATE TABLE test=> Regards, Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header) GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
Andreas, my version is: select version(); PostgreSQL 7.4 informix1.8 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) Is it old version? Can to be the reason for my problem? A. Kretschmer escribió: > am Tue, dem 18.11.2008, um 11:25:16 -0300 mailte Gustavo Rosso folgendes: > >> People of world, help help please. >> I created a DB with super-user postgres, I give all privileges to DB >> (banco is my DB) >> GRANT ALL ON DATABASE banco TO PUBLIC; >> GRANT CREATE ON DATABASE banco TO PUBLIC >> >> But other users can't create tables in this DB >> ERROR: >> banco=> create table tabla (x integer); >> NOTICE: CREATE TABLE / UNIQUE will create implicit index >> "tabla_oid_idx" for table "tabla" >> *ERROR: must be owner of relation tabla* >> banco=> >> > > Which version? > > Apparently very old, since OID are deprecated for a long time. > > > I can't reproduce your problem: > > > test=# create user foo; > CREATE ROLE > test=# GRANT ALL ON DATABASE test to public; > GRANT > test=# GRANT CREATE ON DATABASE test to public; > GRANT > test=# \q > kretschmer@apache-new:~$ psql-dev -U foo test > psql (8.4devel) > Type "help" for help. > > test=> select current_user; > current_user > -------------- > foo > (1 row) > > test=> create table tabla (x integer); > CREATE TABLE > test=> create table tablb (x integer primary key); > NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index > "tablb_pkey" for table "tablb" > CREATE TABLE > test=> > > > > Regards, Andreas >
On Tue, Nov 18, 2008 at 11:46:07AM -0300, Gustavo Rosso <grosso@sadaic.org.ar> wrote a message of 68 lines which said: > PostgreSQL 7.4 informix1.8 on i686-pc-linux-gnu, compiled by GCC gcc > (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) > Is it old version? It is still in Debian "stable" (which also has 8.1) but it will no longer be present in the next "stable", called "lenny", which will be released in one or two months. So, you may prepare to migrate.
"A. Kretschmer" <andreas.kretschmer@schollglas.com> writes: > am Tue, dem 18.11.2008, um 11:25:16 -0300 mailte Gustavo Rosso folgendes: >> banco=> create table tabla (x integer); >> NOTICE: CREATE TABLE / UNIQUE will create implicit index >> "tabla_oid_idx" for table "tabla" >> *ERROR: must be owner of relation tabla* > Which version? > Apparently very old, since OID are deprecated for a long time. There has never been any released version of PostgreSQL that automatically created a unique index on OID. What it looks like to me is that Gustavo is running a version that contains some broken third-party patches. regards, tom lane