something smells bad

From: Martín Marqués <martin(at)bugs(dot)unl(dot)edu(dot)ar>
To: pgsql-general(at)postgresql(dot)org, <pgsql-hackers(at)postgresql(dot)org>
Subject: something smells bad
Date: 2001-06-06 15:39:42
Message-ID: 01060618394205.29859@bugs
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

I'm haveing a very hard time with these views, rules, and I don't know if
it's a programing problem, or it's that I don't understand the docs. I have
this:

webunl=> \d
List of relations
Name | Type | Owner
-----------------------------+----------+--------
admin_view | view | martin
admin_view_categ | view | martin
admin_view_docente | view | martin
admin_view_facultades | view | martin
admin_view_materias | view | martin
admin_view_modal | view | martin
area | table | martin
area_id_area_seq | sequence | martin
carrera | table | martin
carrera_id_curso_seq | sequence | martin
categ | table | martin
categ_id_categ_seq | sequence | martin
docentes | table | martin
docentes_id_docente_seq | sequence | martin
facultad | table | martin
facultad_id_fac_seq | sequence | martin
inscripcion | table | martin
log_carrera | table | martin
log_carrera_id_log_seq | sequence | martin
materias | table | martin
materias_id_mat_seq | sequence | martin
modalidad | table | martin
nexo_categ | table | martin
nexo_facultad | table | martin
niveles | table | martin
niveles_id_nivel_seq | sequence | martin
resol | table | martin
sub_area | table | martin
sub_area_id_subarea_seq | sequence | martin
tipo_cursado | table | martin
tipo_cursado_id_cursado_seq | sequence | martin
tipo_modal | table | martin
tipo_modal_id_mod_seq | sequence | martin
(33 rows)

webunl=> INSERT INTO admin_view
webunl->
(titulo,subarea,descripcion,matricula,nivel,requisitos,duracion,cupos,numero,year,fecha,fecha_ini,fecha_fin,lugar,informes
,director,carrera)
webunl-> VALUES ('y este el tiutulo',14,'descripcion',0,1,'Y bueno, los
requisitos
son.....',12,0,34534,2000,'6/6/2000','10/10/2001','30/12/2001','Donde
webunl'> mas.......','Para mas info, limpie','Quien, yo?','Esta es una
carrera');
INSERT 240131 1
webunl=> \c webunl - mariana
You are now connected to database webunl.
\c: extra argument 'mariana' ignored
webunl=> \c webunl mariana
You are now connected to database webunl as user mariana.
webunl=> INSERT INTO admin_view
webunl->
(titulo,subarea,descripcion,matricula,nivel,requisitos,duracion,cupos,numero,year,fecha,fecha_ini,fecha_fin,lugar,informes
,director,carrera)
webunl-> VALUES ('y este el tiutulo',14,'descripcion',0,1,'Y bueno, los
requisitos
son.....',12,0,34534,2000,'6/6/2000','10/10/2001','30/12/2001','Donde
webunl'> mas.......','Para mas info, limpie','Quien, yo?','Esta es una
carrera');
ERROR: carrera_id_curso_seq.nextval: you don't have permissions to set
sequence carrera_id_curso_seq
webunl=> select version();
version
------------------------------------------------------------------
PostgreSQL 7.1.2 on sparc-sun-solaris2.8, compiled by GCC 2.95.2
(1 row)

The rules are OK as for what I see, but the other user insert even though the
user mariana has ALL permissions on the views (all the views) through her
group (webunl_admin)

webunl=> select * from pg_group;
groname | grosysid | grolist
--------------+----------+------------------
webunl_admin | 500 | {1015,1005,1014}
(1 row)

webunl=> select * from pg_user;
usename | usesysid | usecreatedb | usetrace | usesuper | usecatupd |
passwd | valuntil
----------+----------+-------------+----------+----------+-----------+----------+----------
postgres | 1013 | t | t | t | t |
******** |
webmail | 33 | t | f | t | t |
******** |
todo | 1004 | f | f | f | f |
******** |
aroman | 1014 | t | f | f | f |
******** |
mariana | 1015 | f | f | f | f |
******** |
martin | 1005 | f | f | f | f |
******** |
(6 rows)

What's wrong with this? As you can see, mariana belongs to the webunl_admin
group, and I (martin) have granted ALL permissions to that group.
Any ideas?

Saludos... :-)

--
Cualquiera administra un NT.
Ese es el problema, que cualquiera administre.
-----------------------------------------------------------------
Martin Marques | mmarques(at)unl(dot)edu(dot)ar
Programador, Administrador | Centro de Telematica
Universidad Nacional
del Litoral
-----------------------------------------------------------------

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tim Barnard 2001-06-06 15:46:04 Re: form generator?
Previous Message Doug McNaught 2001-06-06 15:26:47 Re: add java as procedural language

Browse pgsql-hackers by date

  From Date Subject
Next Message KuroiNeko 2001-06-06 15:45:58 Re: Max inserts / sec ... on any platform?
Previous Message Peter Eisentraut 2001-06-06 15:25:14 Re: place for newbie postgresql hackers to work