mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Eliminate unnecessary array[] decoration in examples of recursive cycle
detection.
This commit is contained in:
@ -465,7 +465,7 @@ insert into graph values
|
||||
with recursive search_graph(f, t, label, path, cycle) as (
|
||||
select *, array[row(g.f, g.t)], false from graph g
|
||||
union all
|
||||
select g.*, path || array[row(g.f, g.t)], row(g.f, g.t) = any(path)
|
||||
select g.*, path || row(g.f, g.t), row(g.f, g.t) = any(path)
|
||||
from graph g, search_graph sg
|
||||
where g.f = sg.t and not cycle
|
||||
)
|
||||
|
@ -266,7 +266,7 @@ insert into graph values
|
||||
with recursive search_graph(f, t, label, path, cycle) as (
|
||||
select *, array[row(g.f, g.t)], false from graph g
|
||||
union all
|
||||
select g.*, path || array[row(g.f, g.t)], row(g.f, g.t) = any(path)
|
||||
select g.*, path || row(g.f, g.t), row(g.f, g.t) = any(path)
|
||||
from graph g, search_graph sg
|
||||
where g.f = sg.t and not cycle
|
||||
)
|
||||
|
Reference in New Issue
Block a user