From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Stephen Frost <sfrost(at)snowman(dot)net> |
Cc: | Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
Subject: | Re: make == as = ? |
Date: | 2004-04-07 17:04:27 |
Message-ID: | 200404071704.i37H4R909931@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Stephen Frost wrote:
-- Start of PGP signed section.
> * Josh Berkus (josh(at)agliodbs(dot)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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-04-07 17:12:31 | Re: TRAP during backend startup |
Previous Message | Stephen Frost | 2004-04-07 16:24:00 | Re: make == as = ? |