Re: Modifying SQL parser with extensions?

From: Richard Troy <rtroy(at)ScienceTools(dot)com>
To: Matthias Luedtke <email(at)matthias-luedtke(dot)de>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Modifying SQL parser with extensions?
Date: 2006-10-29 17:18:43
Message-ID: Pine.LNX.4.33.0610290914110.30114-100000@denzel.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, 29 Oct 2006, Alvaro Herrera wrote:
>
> Matthias Lüdtke wrote:
> > Hi everyone,
> >
> > I am searching for the easiest way to let PostgreSQL parse a special
> > dialect of SQL. The dialect I want to parse augments common SQL in a way
> > that enables expressions within a WHERE clause to be annotated and is
> > thus not compatible with the standard SQL syntax anymore.
>
> No, there's no mechanism for that. You'd have to preprocess the query
> before passing it to PostgreSQL.
>

Right, no mechanism within PostgreSql, however there are packages that can
do it for you. I don't know of any in the OpenSource world, but my
company, as but one example, has software that lets you run any dialect of
SQL against nearly any RDBMS - unique and embeded features excluded
(they're just passed through). Our package lets you pass individual
statements or entire files full of SQL with embeded comments as it's not
that uncommon among SQL dialects - they're just stripped out before
getting to the engine, as Alvaro suggested.

Regards,
Richard

--
Richard Troy, Chief Scientist
Science Tools Corporation
510-924-1363 or 202-747-1263
rtroy(at)ScienceTools(dot)com, http://ScienceTools.com/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bob Pawley 2006-10-29 17:23:38 Adding a column
Previous Message Matthias Lüdtke 2006-10-29 17:17:09 Re: Modifying SQL parser with extensions?