Adriano dos Santos Fernandes <adrian...@gmail.com> писал(а) в своём письме Mon, 12 Aug 2013 05:28:25 +0400:
> Please ignore this. > > What PostgreSQL seems to accept (at parser level) and is not standard is: > - WHERE (1 = 1) + (2 = 2) > It's analog WHERE true + true true + true = ? true + false = ? false + false = ? I don't know that tells in this respect the standard, but it seems to me these expressions aren't correct > > Adriano > > > On 11-08-2013 22:17, Adriano dos Santos Fernandes wrote: >> On 05-08-2013 05:17, Dmitry Yemanov wrote: >>> 04.08.2013 16:47, Simonov Denis wrote: >>>> >>>> select 1 >>>> from rdb$database >>>> where true is true >>>> >>>> >>>> Work is correct >>>> >>>> select 1 >>>> from rdb$database >>>> where (1=1) and true >>>> >>>> >>>> Work is correct >>>> >>>> select 1 >>>> from rdb$database >>>> where (1=1) is true >>>> >>>> >>>> Invalid token. >>>> Dynamic SQL Error. >>>> SQL error code = -104. >>>> Token unknown - line 3, column 13. >>>> is. >>> >>> Accordingly to the SQL specification, it should work. Adriano, is it >>> prohibited intentionally? >>> >> >> As I see, PostgreSQL is very liberal and accepts a lot of boolean >> expressions, but it is not accordingly to the standard. >> >> Can you confirm, accordingly to the standard, these are not valid >> expressions? >> - WHERE 1 = 1 >= true >> - WHERE (1 = 1) >= true >> >> accordingly to rules: >> >> <boolean predicand> ::= >> <parenthesized boolean value expression> >> | <nonparenthesized value expression primary> >> >> <nonparenthesized value expression primary> ::= >> <unsigned value specification> >> <column reference> >> <set function specification> >> <window function> >> <scalar subquery> >> <case expression> >> <cast specification> >> <field reference> >> <subtype treatment> >> <method invocation> >> <static method invocation> >> <new specification> >> <attribute or method reference> >> <reference resolution> >> <collection value constructor> >> <array element reference> >> <multiset element reference> >> >> >> Adriano >> >> ------------------------------------------------------------------------------ >> Get 100% visibility into Java/.NET code with AppDynamics Lite! >> It's a free troubleshooting tool designed for production. >> Get down to code-level detail for bottlenecks, with <2% overhead. >> Download for free and get started troubleshooting in minutes. >> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk >> Firebird-Devel mailing list, web interface at >> https://lists.sourceforge.net/lists/listinfo/firebird-devel >> > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite! > It's a free troubleshooting tool designed for production. > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk > Firebird-Devel mailing list, web interface at > https://lists.sourceforge.net/lists/listinfo/firebird-devel > -- Написано в почтовом клиенте браузера Opera: http://www.opera.com/mail/ ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel