SQL flagger - Mailing list pgsql-hackers

From Peter Eisentraut
Subject SQL flagger
Date
Msg-id Pine.LNX.4.44.0301121924150.29178-100000@localhost.localdomain
Whole thread Raw
Responses Re: SQL flagger
List 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@gmx.net



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: A modest proposal for a FAQ addition
Next
From: Tom Lane
Date:
Subject: Re: SQL flagger