SQL flagger

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: SQL flagger
Date: 2003-01-12 18:26:48
Message-ID: Pine.LNX.4.44.0301121924150.29178-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The SQL standard requires conforming implementations to provide an
"SQL flagger" facility that, in its simplest form (which is the only
required one), points out when SQL syntax features that are not in the
core SQL feature set are used. (No catalog lookup is required.) In
other words, it prints a warning when you use extension features.
This feature would probably be useful for users who have little
awareness of standard SQL, and those who want to use PostgreSQL as a
development platform for portable applications.

I think we could implement this with relatively little intrusion if we
create an interface routine, say SQLFlagger(), which takes the entire
parsetree as its argument can then analyze the syntax in as much
detail as it likes. (Of course that function would only be called if
a certain Boolean flag is set.) But a few syntax elements would need
to checked right within gram.y, such as the omission of the drop
behavior or the use of TEMP vs. TEMPORARY, which is resolved right in
the parser and cannot be detected later.

Should we implement this?

--
Peter Eisentraut peter_e(at)gmx(dot)net

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-01-12 18:56:28 Re: SQL flagger
Previous Message Tom Lane 2003-01-12 18:15:08 Re: A modest proposal for a FAQ addition