Re: != should give error?

Поиск
Список
Период
Сортировка
От ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Тема Re: != should give error?
Дата
Msg-id d8j1sjoxff1.fsf@dalvik.ping.uio.no
обсуждение исходный текст
Ответ на Re: != should give error?  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: != should give error?  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:

> Mikael Kjellström wrote:
>
>> BTW isn't the "preferred" way of writing different from / not equal in SQL
>> to use the <> operator?
>
> Yes, <> is the operator mandated by the SQL standard.  I don't think !=
> appears anywhere -- it's our extension only and thus if you use it you
> should not expect your applications to work on other DBMSs.

It seems to be supported work on all the DBMSs supported by sqlfiddle.com,
i.e. Oracle, MySQL, PostgreSQL, SQLite and MS SQL Server.

The DB2 documentation¹ says it's supported (it even supports ¬=, and
negating < and >, not just =).

Firebird² also supports it, in addition to ~= and ^= (and it also
supports negating < and >).

So while it might not be standard SQL, it's definitely not "our
extension only".

[1] https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_72/sqlp/rbafycompop.htm
[2]
https://www.firebirdsql.org/file/documentation/reference_manuals/fblangref25-en/html/fblangref25-commons-expressions.html#fblangref25-dtyp-tbl-comparpreced

- ilmari
-- 
"A disappointingly low fraction of the human race is,
 at any given time, on fire." - Stig Sandbeck Mathisen


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: ddd
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: != should give error?