Re: TkSql and pg_group...

Lists: pgsql-interfaces
From: Sandro Dentella <sandro(dot)dentella(at)tin(dot)it>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: TkSql and pg_group...
Date: 2002-07-07 00:56:57
Message-ID: 20020707005657.GA23126@bluff.diade.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-interfaces


I noticed only today that postgreSQL 7.2 changed the structure of certain
tables like pg_group, that now are no loger editable by my tksql. The reason
is that if TkSql cannot find any of:
1. primary key
2. unique not null
3. oid
switches to read-only mode.

pg_group has only unique key and no oid so that for example you can enter
several times a line like:
insert into pg_group (grolist) values ('{27}');

This is very strange to me, and I'd like to understand it better, moreover
I'd like to understand how should an editor cope with this case: I'd like
to make tksql able to edit these tables too, but I see no way to act on a
record in a unique way.

Thanks in advance
sandro
*:-)

--
Sandro Dentella *:-)
e-mail: sandro(dot)dentella(at)tin(dot)it
http://www.tksql.org TkSQL Home page - My GPL work


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sandro Dentella <sandro(dot)dentella(at)tin(dot)it>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: TkSql and pg_group...
Date: 2002-07-07 16:34:05
Message-ID: 8861.1026059645@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-interfaces

Sandro Dentella <sandro(dot)dentella(at)tin(dot)it> writes:
> I'd like to understand how should an editor cope with this case: I'd like
> to make tksql able to edit these tables too, but I see no way to act on a
> record in a unique way.

You should not be editing system catalogs with INSERT/UPDATE/DELETE
operations in any case.

This points up that the initdb process is pretty lax about marking
catalog columns NOT NULL, even though essentially all fixed-width
columns in the catalogs are in fact expected to not be null ...

regards, tom lane


From: Sandro Dentella <sandro(dot)dentella(at)tin(dot)it>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: TkSql and pg_group...
Date: 2002-07-08 11:04:47
Message-ID: 20020708110447.GA27041@bluff@e-den.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-interfaces

On Sun, Jul 07, 2002 at 12:34:05PM -0400, Tom Lane wrote:
> Sandro Dentella <sandro(dot)dentella(at)tin(dot)it> writes:
> > I'd like to understand how should an editor cope with this case: I'd like
> > to make tksql able to edit these tables too, but I see no way to act on a
> > record in a unique way.
>
> You should not be editing system catalogs with INSERT/UPDATE/DELETE
> operations in any case.
>

This was not true till 7.1 before CREATE GROUP command, correct?
You're suggesting tksql should set read-only any system catalogs, and let
people change them w/ other means?

How are system catalogs recognizable (apart from leading pg_ that a user
could put to other table names...)

TYA

sandro
*:-)

--
Sandro Dentella *:-)
e-mail: sandro(dot)dentella(at)tin(dot)it
http://www.tksql.org TkSQL Home page - My GPL work


From: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: TkSql and pg_group...
Date: 2002-07-08 17:55:04
Message-ID: 20020708175504.GA24313@rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-interfaces

On Mon, Jul 08, 2002 at 01:04:47PM +0200, Sandro Dentella wrote:
> On Sun, Jul 07, 2002 at 12:34:05PM -0400, Tom Lane wrote:
>
> How are system catalogs recognizable (apart from leading pg_ that a user
> could put to other table names...)

You sure?

test=# create table pg_foo (a int, b text);
ERROR: invalid relation name "pg_foo"; the 'pg_' name prefix is reserved for system catalogs

Ross


From: Sandro Dentella <sandro(dot)dentella(at)tin(dot)it>
To: pgsql-interfaces(at)postgresql(dot)org
Cc: "Ross J(dot) Reedstrom" <reedstrm(at)ece(dot)rice(dot)edu>
Subject: Re: TkSql and pg_group...
Date: 2002-07-10 09:22:56
Message-ID: 20020710092256.GC2072@bluff.diade.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-interfaces

On Mon, Jul 08, 2002 at 12:55:04PM -0500, Ross J. Reedstrom wrote:
> On Mon, Jul 08, 2002 at 01:04:47PM +0200, Sandro Dentella wrote:
> > On Sun, Jul 07, 2002 at 12:34:05PM -0400, Tom Lane wrote:
> >
> > How are system catalogs recognizable (apart from leading pg_ that a user
> > could put to other table names...)
>
> You sure?
>
> test=# create table pg_foo (a int, b text);
> ERROR: invalid relation name "pg_foo"; the 'pg_' name prefix is reserved for system catalogs
>
> Ross

Ops!... thanks

*:-)

--
Sandro Dentella *:-)
e-mail: sandro(dot)dentella(at)tin(dot)it
http://www.tksql.org TkSQL Home page - My GPL work