Thread: Scan SQL

Scan SQL

From
Sandro Joel Eller
Date:
Hi

I need to make a parser in a sql to get tables and fields to verify the 
privileges. Do anybody know software, function or anything that can help me?

I found software to create a compiler and generate the source in delphi, but I 
need a sql specification (BNF, EBNF) and I do not know where to find it.

Thanks
    Sandro


Re: Scan SQL

From
"Josh Berkus"
Date:
Sandro,

> I need to make a parser in a sql to get tables and fields to verify
> the 
> privileges. Do anybody know software, function or anything that can
> help me?

I probably can, but I'm not quite sure what you're asking for.   Could
you explain at greater length, maybe with some examples?

-Josh Berkus


Re: Scan SQL

From
Roberto Mello
Date:
On Tue, Jul 23, 2002 at 10:11:18AM -0300, Sandro Joel Eller wrote:
> Hi
> 
> I need to make a parser in a sql to get tables and fields to verify the 
> privileges. Do anybody know software, function or anything that can help me?
> 
> I found software to create a compiler and generate the source in delphi, but I 
> need a sql specification (BNF, EBNF) and I do not know where to find it.

You could look at how PostgreSQL does its parsing. The source code is
open.

-Roberto

-- 
+----| http://fslc.usu.edu/ USU Free Software & GNU/Linux Club |------+ Roberto Mello - Computer Science, USU -
http://www.brasileiro.net/      http://www.sdl.usu.edu/ - Space Dynamics Lab, Developer    
 
I to¤d yo¤, "Never¤touch ¤he flo¤py di¤k su¤face!"


Re: Scan SQL

From
Josh Jore
Date:
On Tue, 23 Jul 2002, Roberto Mello wrote:

> On Tue, Jul 23, 2002 at 10:11:18AM -0300, Sandro Joel Eller wrote:
> > Hi
> >
> > I need to make a parser in a sql to get tables and fields to verify the
> > privileges. Do anybody know software, function or anything that can help me?
> >
> > I found software to create a compiler and generate the source in delphi, but I
> > need a sql specification (BNF, EBNF) and I do not know where to find it.
>
> You could look at how PostgreSQL does its parsing. The source code is
> open.
>
> -Roberto

Check out src/backend/parser/*.y for full YACC grammars.

Joshua b. Jore ; http://www.greentechnologist.org



Re: Scan SQL

From
"Sandro Joel Eller"
Date:
Josh

The good, will be, see the sample below, return field list and table list of
the sql and to analyse it to give permission or not to open the table in
delphi.

select a, b, c, d from z, x

Sandro

----- Original Message -----
From: "Josh Berkus" <josh@agliodbs.com>
To: "Sandro Joel Eller" <sandro@tecsoft.com.br>; <pgsql-sql@postgresql.org>
Sent: Tuesday, July 23, 2002 3:40 PM
Subject: Re: [SQL] Scan SQL


> Sandro,
>
> > I need to make a parser in a sql to get tables and fields to verify
> > the
> > privileges. Do anybody know software, function or anything that can
> > help me?
>
> I probably can, but I'm not quite sure what you're asking for.   Could
> you explain at greater length, maybe with some examples?
>
> -Josh Berkus
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster