Maxim Boguk <maxim.boguk@xxxxxxxxx> writes: > Is here any way to combine WITH and WITH RECURSIVE into single query? You have to put RECURSIVE immediately after WITH, but that doesn't force you to actually make any particular query in the WITH-list recursive. It just makes it possible for a query to be self-referential, not required. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general