Обсуждение: Scan SQL

Поиск
Список
Период
Сортировка

Scan SQL

От
Sandro Joel Eller
Дата:
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

От
"Josh Berkus"
Дата:
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

От
Roberto Mello
Дата:
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

От
Josh Jore
Дата:
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

От
"Sandro Joel Eller"
Дата:
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