Open
Description
Hello,
Here is an example
create function foobar()
returns table(
"n" integer
)
as $$
begin
if "_a" then
if "_b" then
if "_c" then
return query
select
1
union all
select
1
union all
select
1
end if;
end if;
end if;
end;
$$
language plpgsql;
If I wrap selects in a parantheses, it starts de-indenting between each union all:
create function foobar()
returns table(
"n" integer
)
as $$
begin
if "_a" then
if "_b" then
if "_c" then
return query(
select
1)
union all(
select
1)
union all(
select
1)
end if;
end if;
end if;
end;
$$
language plpgsql;
I would expect it to become:
create function foobar()
returns table(
"n" integer
)
as $$
begin
if "_a" then
if "_b" then
if "_c" then
return query
(select
1)
union all
(select
1)
union all
(select
1)
end if;
end if;
end if;
end;
$$
language plpgsql;
Metadata
Metadata
Assignees
Labels
No labels