Stephen Frost wrote:
-- Start of PGP signed section.
> * Josh Berkus (josh@agliodbs.com) wrote:
> > Were I teaching a class with a SQL component, using PostgreSQL as a tool, I
> > would be very careful to avoid letting my students use an extensions to SQL;
> > no "!=", no "SELECT DISTINCT ON" and no alias references in the GROUP BY
> > clause.
>
> I'd really like PostgreSQL to somehow warn me when I start doing things
> like this. It's not my intent to use PostgreSQL-specific SQL in general
> so when I start doing it I'd like to know. In some cases there may not
> be an option, of course, but especially in cases where there's a 'right
> way' I'd love for PostgreSQL to spit out a warning which tells me what
> the right way is.
>
> ie: "select * from table_name where column_name != '1';"
> Warning: '!=' is not valid SQL, use '<>' instead.
>
> This would help me, at least, write correct and portable SQL. :)
Added to TODO:
* Add a session mode to warn about non-standard SQL usage
-- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610)
359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square,
Pennsylvania19073