Surprising syntax error

From: Marc Munro <marc(at)bloodnok(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Surprising syntax error
Date: 2008-05-14 19:07:04
Message-ID: 1210792024.3296.32.camel@bloodnok.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sam Mason 2008-05-14 19:27:19 Re: rounding problems
Previous Message mailtolouis2020-postgres 2008-05-14 19:05:22 Re: postgres crash when select a record

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2008-05-14 19:25:10 Re: What to do with inline warnings?
Previous Message Andrew Chernow 2008-05-14 18:09:09 Re: libpq object hooks