Re: [SQL] Common table expression - parsing questions

2009-10-05 Thread Lew
(top-posting corrected) Thomas Kellerer wrote: The standard *requires* the keyword. the6campbells wrote: the db2 [sic] family does not Ergo DB2 is not standard-compliant in that regard. -- Lew -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscr

Re: [SQL] Common table expression - parsing questions

2009-10-04 Thread Tom Lane
Thomas Kellerer writes: > the6campbells wrote on 29.09.2009 04:54: >> 2. Do you intend to remove the requirement to include the recursive >> keyword - as other vendors allow > The standard *requires* the keyword. The reason the standard requires the keyword is that the WITH-name scoping rules

Re: [SQL] Common table expression - parsing questions

2009-10-04 Thread the6campbells
the db2 family does not On Sun, Oct 4, 2009 at 2:10 AM, Thomas Kellerer wrote: > the6campbells wrote on 29.09.2009 04:54: > >> 2. Do you intend to remove the requirement to include the recursive >> keyword - as other vendors allow >> > > The standard *requires* the keyword. > As far as I can tel

Re: [SQL] Common table expression - parsing questions

2009-10-03 Thread Thomas Kellerer
the6campbells wrote on 29.09.2009 04:54: 2. Do you intend to remove the requirement to include the recursive keyword - as other vendors allow The standard *requires* the keyword. As far as I can tell there are two DBMS that require it (Postgres, Firebird) and two that don't (SQL Server and

[SQL] Common table expression - parsing questions

2009-10-03 Thread the6campbells
Couple of questions: 1. Why does Postgres not throw a parsing error during sqlPrepare for this statement vs at sqlExecute with t_cte ( c1, ctr ) as ( select 1,0 from tversion union select 2,0 from tversion union all select c1, ctr + 1 from t_cte where c1=1 and ctr < 5 union all select c1, ctr + 1