Re: [GENERAL] Surprising syntax error

Lists: pgsql-generalpgsql-hackers
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
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


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Marc Munro <marc(at)bloodnok(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [GENERAL] Surprising syntax error
Date: 2008-06-30 22:39:13
Message-ID: 200806302239.m5UMdDl16982@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers

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. +


From: Bruce Momjian <bruce(at)momjian(dot)us>
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-21 22:38:15
Message-ID: 200808212238.m7LMcGb02692@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers


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. +


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
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: Bruce Momjian <bruce(at)momjian(dot)us>
To: "Decibel!" <decibel(at)decibel(dot)org>
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 16:42:03
Message-ID: 200808221642.m7MGg3R03823@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers

Decibel! wrote:
> Are we still tracking beginner TODOs separately? I'm thinking this
> falls into that category...
>
> Barring objection, I'll mark it as easy.

I already had; markers just don't cust/paste easily like they used to.

--
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. +


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: "Decibel!" <decibel(at)decibel(dot)org>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, 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 16:42:42
Message-ID: 48AEEC82.8030707@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers


depends if you think hacking the bison grammar is a beginner task.

cheers

andrew

Decibel! wrote:
> 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: Hannu Krosing <hannu(at)krosing(dot)net>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Decibel! <decibel(at)decibel(dot)org>, Bruce Momjian <bruce(at)momjian(dot)us>, 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 19:28:09
Message-ID: 1219433289.7020.1.camel@huvostro
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers

On Fri, 2008-08-22 at 12:42 -0400, Andrew Dunstan wrote:
> depends if you think hacking the bison grammar is a beginner task.

It may be anything from beginners task to quite complex . Some things
are just copy&paste.

-------------
Hannu


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Marc Munro <marc(at)bloodnok(dot)com>
Subject: Re: [GENERAL] Surprising syntax error
Date: 2008-08-23 12:38:50
Message-ID: 200808231538.50992.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers

On Tuesday 01 July 2008 01:39:13 Bruce Momjian wrote:
> Is there a downside to adding "VIEW" in parser/gram.y:privilege_target?

The SQL standard doesn't specify it. And there is no need for it.


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org, Marc Munro <marc(at)bloodnok(dot)com>
Subject: Re: [GENERAL] Surprising syntax error
Date: 2008-08-23 13:52:54
Message-ID: 200808231352.m7NDqsp16945@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers

Peter Eisentraut wrote:
> On Tuesday 01 July 2008 01:39:13 Bruce Momjian wrote:
> > Is there a downside to adding "VIEW" in parser/gram.y:privilege_target?
>
> The SQL standard doesn't specify it. And there is no need for it.

While we don't _need_ it, it would make our system more consistent; we
have made similar changes for views in other areas.

--
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. +


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Marc Munro <marc(at)bloodnok(dot)com>
Subject: Re: [GENERAL] Surprising syntax error
Date: 2008-08-23 16:12:57
Message-ID: 3912.1219507977@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers

Bruce Momjian <bruce(at)momjian(dot)us> writes:
> Peter Eisentraut wrote:
>> On Tuesday 01 July 2008 01:39:13 Bruce Momjian wrote:
>>> Is there a downside to adding "VIEW" in parser/gram.y:privilege_target?
>>
>> The SQL standard doesn't specify it. And there is no need for it.

> While we don't _need_ it, it would make our system more consistent; we
> have made similar changes for views in other areas.

I'm not sure it'd make the system more consistent. Because the SQL
standard says you use GRANT ON TABLE for a view. we'd have to always
ensure that we accepted that; whereas in at least some other places
we are trying to be picky about TABLE/VIEW/SEQUENCE actually matching
the object type.

Given the spec precedent, I'm inclined to leave it alone. It's not like
there aren't plenty of other SQL quirks that surprise novices.

regards, tom lane


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Marc Munro <marc(at)bloodnok(dot)com>
Subject: Re: [GENERAL] Surprising syntax error
Date: 2008-08-23 18:52:16
Message-ID: 200808231852.m7NIqG720627@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > Peter Eisentraut wrote:
> >> On Tuesday 01 July 2008 01:39:13 Bruce Momjian wrote:
> >>> Is there a downside to adding "VIEW" in parser/gram.y:privilege_target?
> >>
> >> The SQL standard doesn't specify it. And there is no need for it.
>
> > While we don't _need_ it, it would make our system more consistent; we
> > have made similar changes for views in other areas.
>
> I'm not sure it'd make the system more consistent. Because the SQL
> standard says you use GRANT ON TABLE for a view. we'd have to always
> ensure that we accepted that; whereas in at least some other places
> we are trying to be picky about TABLE/VIEW/SEQUENCE actually matching
> the object type.
>
> Given the spec precedent, I'm inclined to leave it alone. It's not like
> there aren't plenty of other SQL quirks that surprise novices.

OK, removed from TODO.

--
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. +


From: "Robert Haas" <robertmhaas(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Bruce Momjian" <bruce(at)momjian(dot)us>, "Peter Eisentraut" <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, "Marc Munro" <marc(at)bloodnok(dot)com>
Subject: Re: [GENERAL] Surprising syntax error
Date: 2008-08-23 19:14:22
Message-ID: 603c8f070808231214p6a85b37cpfe4dcb4a2ae0deb8@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers

>> While we don't _need_ it, it would make our system more consistent; we
>> have made similar changes for views in other areas.
>
> I'm not sure it'd make the system more consistent. Because the SQL
> standard says you use GRANT ON TABLE for a view. we'd have to always
> ensure that we accepted that; whereas in at least some other places
> we are trying to be picky about TABLE/VIEW/SEQUENCE actually matching
> the object type.
>
> Given the spec precedent, I'm inclined to leave it alone. It's not like
> there aren't plenty of other SQL quirks that surprise novices.

I fail to understand why it's advantageous to artificially create
surprising behavior. There are cases where PostgreSQL now accepts
either ALTER VIEW or ALTER TABLE where it previously accepted only the
latter, so the situation is hardly without precedent. I find it
exceedingly unlikely that anyone is relying on GRANT ON VIEW to NOT
work.

...Robert


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Marc Munro <marc(at)bloodnok(dot)com>
Subject: Re: [GENERAL] Surprising syntax error
Date: 2008-08-23 19:49:44
Message-ID: 200808231949.m7NJnij25115@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers

Robert Haas wrote:
> >> While we don't _need_ it, it would make our system more consistent; we
> >> have made similar changes for views in other areas.
> >
> > I'm not sure it'd make the system more consistent. Because the SQL
> > standard says you use GRANT ON TABLE for a view. we'd have to always
> > ensure that we accepted that; whereas in at least some other places
> > we are trying to be picky about TABLE/VIEW/SEQUENCE actually matching
> > the object type.
> >
> > Given the spec precedent, I'm inclined to leave it alone. It's not like
> > there aren't plenty of other SQL quirks that surprise novices.
>
> I fail to understand why it's advantageous to artificially create
> surprising behavior. There are cases where PostgreSQL now accepts
> either ALTER VIEW or ALTER TABLE where it previously accepted only the
> latter, so the situation is hardly without precedent. I find it
> exceedingly unlikely that anyone is relying on GRANT ON VIEW to NOT
> work.

Yes, I assumed we were following the recent work on ALTER TABLE/VIEW
with GRANT/REVOKE. Peter, Tom, how is GRANT/REVOKE different?

--
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. +


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Marc Munro <marc(at)bloodnok(dot)com>
Subject: Re: [GENERAL] Surprising syntax error
Date: 2008-08-23 20:00:23
Message-ID: 7107.1219521623@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers

Bruce Momjian <bruce(at)momjian(dot)us> writes:
> Yes, I assumed we were following the recent work on ALTER TABLE/VIEW
> with GRANT/REVOKE. Peter, Tom, how is GRANT/REVOKE different?

GRANT/REVOKE behavior is specified by the standard, whereas the stuff
we allow under ALTER VIEW is all an extension to the standard --- not
merely syntax-wise, but functionality.

A concrete reason not to do it is that if someone writes GRANT ON VIEW,
their code won't port to other DBs that are following the spec, and
it'll be only because we allowed non-spec syntactic sugar, not because
they're using functionality not covered by the spec.

We routinely complain about mysql inventing nonstandard ways to express
things that have perfectly good spec-compliant equivalents. How would
this be different?

regards, tom lane


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Marc Munro <marc(at)bloodnok(dot)com>
Subject: Re: [GENERAL] Surprising syntax error
Date: 2008-08-23 20:23:59
Message-ID: 200808232023.m7NKNxF29703@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > Yes, I assumed we were following the recent work on ALTER TABLE/VIEW
> > with GRANT/REVOKE. Peter, Tom, how is GRANT/REVOKE different?
>
> GRANT/REVOKE behavior is specified by the standard, whereas the stuff
> we allow under ALTER VIEW is all an extension to the standard --- not
> merely syntax-wise, but functionality.
>
> A concrete reason not to do it is that if someone writes GRANT ON VIEW,
> their code won't port to other DBs that are following the spec, and
> it'll be only because we allowed non-spec syntactic sugar, not because
> they're using functionality not covered by the spec.
>
> We routinely complain about mysql inventing nonstandard ways to express
> things that have perfectly good spec-compliant equivalents. How would
> this be different?

OK, so this is a standards issue, then, OK, makes sense.

--
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. +