Re: [PATCHES] NO-CREATE-TABLE and NO-LOCK-TABLE

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Karel Zak - Zakkr <zakkr(at)zf(dot)jcu(dot)cz>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] NO-CREATE-TABLE and NO-LOCK-TABLE
Date: 2000-02-28 23:19:57
Message-ID: Pine.LNX.4.21.0002282246340.3511-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Karel Zak - Zakkr writes:

> This patch add to current code NOCREATETABLE and NOLOCKTABLE feature:
>
> CREATE USER username
> [ WITH
> [ SYSID uid ]
> [ PASSWORD 'password' ] ]
> [ CREATEDB | NOCREATEDB ] [ CREATEUSER | NOCREATEUSER ]
> -> [ CREATETABLE | NOCREATETABLE ] [ LOCKTABLE | NOLOCKTABLE ]
> ...etc.

IMHO, the syntax for create user is a hell and a half. Adding more
keywords in the current fashion is a dead end. (Note: you have to remember
the order in which the user "features" have to be entered.)

I might as well propose that now, I'd like to see a syntax like

CREATE USER name (
password = 'xxx',
sysid = 99,
superuser = true,
...
);

That's much more flexible and extensible. The old syntax could coexist
with this too.

Regarding your two new features:

If you disallow table locking you might as well tell users not to use the
database. People need locks to operate a relational database. You will end
up disabling the entire transaction mechanism if you want this to work
properly. There already is a sufficient amount of checks for users not
claiming exlusive locks on tables they shouldn't.

Disallowing table creation might seem like a decent idea, but if at all,
it should go into the grant/revoke realm. Incidentally, this is quite at
odds with the SQL idea of how things should work, and I had hoped we could
get there some day.

--
Peter Eisentraut Sernanders väg 10:115
peter_e(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2000-02-28 23:20:05 Re: [HACKERS] Beta for 4:30AST ... ?
Previous Message Peter Eisentraut 2000-02-28 23:19:22 Re: [HACKERS] Beta for 4:30AST ... ?