Re: [HACKERS] Updated TODO item

Поиск
Список
Период
Сортировка
От Fernando Nasser
Тема Re: [HACKERS] Updated TODO item
Дата
Msg-id 3C7A4E2D.6160062F@redhat.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Updated TODO item  (Gavin Sherry <swm@linuxworld.com.au>)
Список 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 по дате отправления:

Предыдущее
От: andrea gelmini
Дата:
Сообщение: Re: stupid patch of pg_dumplo
Следующее
От: Fernando Nasser
Дата:
Сообщение: Re: Fix command completion for CREATE TABEL ... AS