Thread: Surprising syntax error

Surprising syntax error

From
Marc Munro
Date:
The statement:

  revoke all on view internal.all_objects from public;

yields a syntax error.  The docs show that the word "view" is not
acceptable in this statement which is fine but the surprising thing is
that:

  revoke all on table internal.all_objects from public;

works fine even though all_objects is a view and not a table.

Now that I know about it, this doesn't bother me but it was a surprise
and I wonder whether the the parser/planner/whatever should be a bit
smarter about allowing the word table to apply to non-tables, and
whether the word view ought to be allowed.

__
Marc

Attachment