Skip Menu |

This queue is for tickets about the SQL-Translator CPAN distribution.

Report information
The Basics
Id: 3125
Status: resolved
Worked: 6 min
Priority: 0/
Queue: SQL-Translator

People
Owner: kclark [...] cpan.org
Requestors: stephen [...] jadevine.org.uk
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.02
Fixed in: (no value)



Subject: Small bug in Postgres parser for GRANT and REVOKE
Hi there, I've come across a small bug in the PostgreSQL parser, the TABLE part of the command syntax is optional according to the reference manual provided with PostgreSQL 7.3. The patch is attached. Stephen Quinney
--- libsql-translator-perl-0.02.orig/lib/SQL/Translator/Parser/PostgreSQL.pm +++ libsql-translator-perl-0.02/lib/SQL/Translator/Parser/PostgreSQL.pm @@ -159,0 +159,0 @@ set : /SET/ /[^;]*/ ';' -revoke : /revoke/i WORD(s /,/) /on/i /table/i table_name /from/i name_with_opt_quotes(s /,/) ';' +revoke : /revoke/i WORD(s /,/) /on/i /(table)?/i table_name /from/i name_with_opt_quotes(s /,/) ';' { my $table_name = $item{'table_name'}; push @{ $tables{ $table_name }{'permissions'} }, { @@ -169,2 +169,2 @@ } } -grant : /grant/i WORD(s /,/) /on/i /table/i table_name /to/i name_with_opt_quotes(s /,/) ';' +grant : /grant/i WORD(s /,/) /on/i /(table)?/i table_name /to/i name_with_opt_quotes(s /,/) ';' { my $table_name = $item{'table_name'}; push @{ $tables{ $table_name }{'permissions'} }, {
Date: Thu, 7 Aug 2003 15:01:41 +0100
From: Stephen Quinney <stephen [...] jadevine.org.uk>
To: SQL-Translator <bug-SQL-Translator [...] rt.cpan.org>
Subject: Re: [cpan #3125] AutoReply: Small bug in Postgres parser for GRANT and REVOKE
RT-Send-Cc:
As a followup to this I think I've found another small problem with the GRANT and REVOKE command grammars. It seems to be selecting the incorrect field for the users to which rights are being granted or revoked. My patch for this is attached, please check this thoroughly as I'm fairly new to this Parse::RecDescent lark. Thanks, Stephen Quinney

Message body is not shown because sender requested not to inline it.