> As far as I can tell this currently *only* works for recursive queries
> - at least I could not get a non-recursive CTE to work.
Yes, that's possible. I only tested the recursive case. I think that's
the main reason to use CTE.
> Is it planned to extend this to a complete implementation of common
> table expressions (non-recursive and recursive)?
Yes, but it doesn't have a high priority for me. What is your use
case, and why can't you use regular views / subqueries?
Regards,
Thomas
> Well, (non-recursive) CTE can be used to optimize statements where the
> same sub-select is used more than once but with slightly different
> WHERE conditions.
You can also use views, right?
Regards,
Thomas
regards,
Dario
> I have cases of complex queries with more than 20 CTEs with multiple an cross usage in one query.
It sounds like you should change your application. You have a serious
complexity problem here. I don't think that this is related to the
database you use.
Regards,
Thomas