Re: Suggestion: Implicit permissions on implicitly generated objects

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: <cgg007(at)yahoo(dot)com>, <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Suggestion: Implicit permissions on implicitly generated objects
Date: 2004-04-30 11:41:23
Message-ID: 03AF4E498C591348A42FC93DEA9661B889FBEC@mail.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

> -----Original Message-----
> From: Chris Gamache [mailto:cgg007(at)yahoo(dot)com]
> Sent: 29 April 2004 20:47
> To: pgadmin-hackers(at)postgresql(dot)org
> Subject: [pgadmin-hackers] Suggestion: Implicit permissions
> on implicitly generated objects
>
> In the past (PgAdmin II :) ) when a Sequence was created
> implicitly by the use of a "serial" column type, the
> permissions that were applied to the table at creation time
> were applied to the sequence. The column definition was
> changed to read something like
>
> id int4 NOT NULL DEFAULT nextval('implicitlygenerated_id_seq'::text);
>
> Now it reads: "id serial NOT NULL" which isn't bad, but is
> not as specific as the translated column definition.

Hi Chris,

Both pgAdmin II and III create serial columns in the same way - ie. by
executing a query like 'CREATE TABLE foo (bar serial);'. pgAdmin III
will reverse engineer the SQL a little more intelligently though - if
the default value matches "nextval('<schema>.<table>_<column>_seq')"
then it automatically rewrites the default into a 'serial' column.

> Permissions aren't propagated as they once were.

pgAdmin never propagated permissions.

> It is also required to manually create a primary key
> constraint... If the same table create statement was issued
> using the query tool, the implicit sequence would be created,
> a primary key constraint would be created and an index would
> be created implicitly as well. One would still have to add
> proper permissions to the sequence if anyone other than the
> owner/superuser wanted to mess with it.

Sorry, you've lost me there.

Regards, Dave.

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Chris Gamache 2004-04-30 13:46:11 Re: Suggestion: Implicit permissions on implicitly generated objects
Previous Message Chris Gamache 2004-04-29 19:46:42 Suggestion: Implicit permissions on implicitly generated objects