Re: [PATCH] Allow multiple recursive self-references

Поиск
Список
Период
Сортировка
От Denis Hirn
Тема Re: [PATCH] Allow multiple recursive self-references
Дата
Msg-id B8715F3D-81D1-4033-A195-413EE5CC5F05@uni-tuebingen.de
обсуждение исходный текст
Ответ на Re: [PATCH] Allow multiple recursive self-references  (Denis Hirn <denis.hirn@uni-tuebingen.de>)
Ответы Re: [PATCH] Allow multiple recursive self-references  (Denis Hirn <denis.hirn@uni-tuebingen.de>)
Список pgsql-hackers
Based on Toms feedback, and due to the fact that SQL:2021 forbids
non-linear recursion, version 2 of the patch allows only linear
recursion. Therefore, later SQL committee decisions on non-linear
recursion should not be problematic.

> [LIN] PostgreSQL does not allow multiple references to the recursive
> common table, even if the recursion is LINEAR. Plenty of examples
> of such queries are found in the documentation of established RDBMSs,
> among these IBM Db2 and MS SQL Server:
>
> (example "Two tables used for recursion using recursive common
> table expressions")

See the gist at [1] below for SQL code that features multiple (yet linear)
recursive references. A patched PostgreSQL runs this query as expected.

Best wishes,
--Denis and Torsten



Вложения

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

Предыдущее
От: Sait Talha Nisanci
Дата:
Сообщение: Re: Crash in record_type_typmod_compare
Следующее
От: David Steele
Дата:
Сообщение: Re: invalid data in file backup_label problem on windows