Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SET is_cycle TO TRUE DEFAULT FALSE #2

Open
df7cb opened this issue Dec 16, 2022 · 1 comment
Open

SET is_cycle TO TRUE DEFAULT FALSE #2

df7cb opened this issue Dec 16, 2022 · 1 comment

Comments

@df7cb
Copy link
Contributor

df7cb commented Dec 16, 2022

sqlreduce shouldn't be this verbose in the CYCLE clause:

$ sqlreduce -d postgres
WITH RECURSIVE
run(x, y) AS (
  SELECT 0, 0
  UNION ALL
  SELECT x, y FROM run AS r WHERE r.is_cycle
)
CYCLE x, y SET is_cycle USING path
TABLE run

Minimal query yielding the same error:
WITH RECURSIVE run(x, y) AS (SELECT NULL, NULL UNION ALL SELECT FROM run AS r WHERE r.is_cycle) CYCLE x, y SET is_cycle TO TRUE DEFAULT FALSE USING path SELECT

From https://www.postgresql.org/message-id/17723-2c4985ff111e7bba%40postgresql.org by @xocolatl.

@df7cb
Copy link
Contributor Author

df7cb commented Dec 16, 2022

Oh and of course these might be expressions and could be descended into.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant