From: | Decibel! <decibel(at)decibel(dot)org> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | Marc Munro <marc(at)bloodnok(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [GENERAL] Surprising syntax error |
Date: | 2008-08-22 04:47:00 |
Message-ID: | 98DD2450-2DDE-4F90-9ABB-A2D04DF6DAA4@decibel.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Are we still tracking beginner TODOs separately? I'm thinking this
falls into that category...
Barring objection, I'll mark it as easy.
On Aug 21, 2008, at 5:38 PM, Bruce Momjian wrote:
>
> Added to TODO:
>
> Allow GRANT/REVOKE on views to use the VIEW keyword rather
> than just TABLE
>
> http://archives.postgresql.org/pgsql-hackers/2008-06/msg01133.php
>
>
> ----------------------------------------------------------------------
> -----
>
> Bruce Momjian wrote:
>> Marc Munro wrote:
>> -- Start of PGP signed section.
>>> 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.
>>
>> Yes, I can confirm this behavior on CVS HEAD, and it is odd:
>>
>> test=> CREATE SCHEMA internal;
>> CREATE SCHEMA
>> test=> CREATE VIEW internal.all_objects AS SELECT 1;
>> CREATE VIEW
>> test=> REVOKE ALL ON VIEW internal.all_objects FROM PUBLIC;
>> ERROR: syntax ERROR AT OR near "internal"
>> LINE 1: REVOKE ALL ON VIEW internal.all_objects FROM PUBLIC;
>> ^
>> test=> REVOKE ALL ON TABLE internal.all_objects FROM PUBLIC;
>> REVOKE
>>
>> Is there a downside to adding "VIEW" in parser/
>> gram.y:privilege_target?
>>
>> --
>> Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
>> EnterpriseDB http://enterprisedb.com
>>
>> + If your life is a hard drive, Christ can be your backup. +
>>
>> --
>> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-hackers
>
> --
> Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
> EnterpriseDB http://enterprisedb.com
>
> + If your life is a hard drive, Christ can be your backup. +
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
--
Decibel!, aka Jim C. Nasby, Database Architect decibel(at)decibel(dot)org
Give your computer some brain candy! www.distributed.net Team #1828
From | Date | Subject | |
---|---|---|---|
Next Message | Decibel! | 2008-08-22 05:34:16 | Re: Single character bitfields |
Previous Message | Alvaro Herrera | 2008-08-22 02:26:51 | Re: Pg dump Error |
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2008-08-22 05:22:44 | Re: proposal sql: labeled function params |
Previous Message | Decibel! | 2008-08-22 04:41:30 | Re: proposal sql: labeled function params |