Re: [HACKERS] Updated TODO item - Mailing list pgsql-patches

From Fernando Nasser
Subject Re: [HACKERS] Updated TODO item
Date
Msg-id 3C7A4E2D.6160062F@redhat.com
Whole thread Raw
In response to Re: [HACKERS] Updated TODO item  (Gavin Sherry <swm@linuxworld.com.au>)
List pgsql-patches
Tom Lane wrote:
>
> Fernando Nasser <fnasser@redhat.com> writes:
> > The syntax of the CREATE SCHEMA SQL standard command is
> > CREATE SCHEMA AUTHORIZATION userid
> > Shouldn't we be using
> > CREATE DATABASE AUTHORIZATION userid
> > to be consistent?
>
> Seems like a very weak analogy; there's no other similarities between
> the two command syntaxes, so why argue that this should be the same?


The analogy is not with the command -- it is with with the token
'userid'.
The key word prefix tells what that token is supposed to be, and that
is an <authorization-id>.  THe key word AUTHORIZATION works like a sort
of an 'adjective'.


> Also, the semantics aren't the same --- for example, there's no a-priori
> assumption that a database owner owns everything within the database.
>

I thought you were arguing that neither would a schema (i.e., you wanted
objects in a schema to have different owners).

Anyway, that is not the point here. We have two commands that
create groups of database objects (our "database" is the SQL catalog)
and both specify who will own it.  The CREATE DATABASE is implementation
defined and we can do whatever we want with it, but as we have a
standard
command that uses a syntax to specify the owner I think we should follow
it.


With the additional advantage that the '=' problem goes away and we
avoid
future shift/reduce problems in the parser as 'WITH' is already too
overloaded.


--
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

pgsql-patches by date:

Previous
From: andrea gelmini
Date:
Subject: Re: stupid patch of pg_dumplo
Next
From: Fernando Nasser
Date:
Subject: Re: Fix command completion for CREATE TABEL ... AS