Skip to content

SET is_cycle TO TRUE DEFAULT FALSE #2

@df7cb

Description

@df7cb

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions