You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pgspot dies reporting a syntax error on a file containing a return query execute <sql> using <var>;statement.
Here is a SQL script to reproduce the issue.
createschemarepro;
create or replacefunctionrepro.this_dont_work(x int)
returns table(y int)
as $func$
declare
begin
return query execute $$
select y
from generate_series(1, $1) y
$$ using x;
end;
$func$ language plpgsql stable security invoker
set search_path to pg_catalog, pg_temp
;
As you can see below, postgres likes the code just fine:
But, pgspot dies on it:
pgspot repro.sql
Errors: 0 Warnings: 0 Unknown: 0
syntax error at or near "$$
select y
from generate_series(1, $1) y
$$", at index 0
The text was updated successfully, but these errors were encountered:
pgspot dies reporting a syntax error on a file containing a
return query execute <sql> using <var>;
statement.Here is a SQL script to reproduce the issue.
As you can see below, postgres likes the code just fine:
But, pgspot dies on it:
The text was updated successfully, but these errors were encountered: