Re: [HACKERS] something smells bad

From: Alex Pilosov <alex(at)pilosoft(dot)com>
To: Martín Marqués <martin(at)bugs(dot)unl(dot)edu(dot)ar>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [HACKERS] something smells bad
Date: 2001-06-06 22:14:54
Message-ID: Pine.BSO.4.10.10106061812470.8625-100000@spider.pilosoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Wed, 6 Jun 2001, [iso-8859-1] Martn Marqus wrote:

> On Jue 07 Jun 2001 00:58, you wrote:
> > 1) Please don't crosspost to both hackers and general
> >
(plonk myself)

> > On Wed, 6 Jun 2001, [iso-8859-1] Martn Marqus wrote:
> > > ERROR: carrera_id_curso_seq.nextval: you don't have permissions to set
> > > sequence carrera_id_curso_seq
> >
> > Because of the way postgres works, you need to grant write permission on
> > the carrera_id_curso_seq for your inserts to succeed.
>
> This doesn't sound logical. The user from the group granted can insert data,
> but not in a SERIAL field?
> This is not what the "RULES and permissions" documentation says.
I guess the documentation has to be changed then.

Postgres sequences are really non-transparent, and you have to be aware of
that. Such as, when you drop the table, sequence won't get dropped,
permissions are separate on table and sequence, and various other things.

> area_id_area_seq |
> carrera_id_curso_seq |
> categ_id_categ_seq |
> docentes_id_docente_seq |
> facultad_id_fac_seq |
> log_carrera_id_log_seq |
> materias_id_mat_seq |
> niveles_id_nivel_seq |
>
> As you can see, the permissions look OK.
You must have permissions on _seq as well as on the underlying table...

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2001-06-06 22:19:07 using create constraint trigger
Previous Message Alex Pilosov 2001-06-06 21:58:52 Re: [HACKERS] something smells bad

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Forsman 2001-06-06 22:32:37 Re: SQL( "if ...exists...),how to do it in the PostgreSQL?
Previous Message Tom Lane 2001-06-06 22:10:00 Re: Re: [PATCHES] Fw: Isn't pg_statistic a security hole - Solution Proposal