How to fix Execute format error? - Mailing list pgsql-sql

From Joe How
Subject How to fix Execute format error?
Date
Msg-id CAPM0uuWuF-4O9fgDVG_RcmUrkPvUZmznXEc-UViakpuOY1R6mg@mail.gmail.com
Whole thread Raw
Responses Re: How to fix Execute format error?  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-sql
Dear all,

I have a query in Postgres like below:
EXECUTE FORMAT(  $$ SELECT * FROM %I.%I CROSS JOIN LATERAL json_to_record(%I::json) AS rs(%s); $$,  'public',  'vehicles',  'column_a',  array_to_string(                (SELECT ARRAY(SELECT DISTINCT col FROM vehicles CROSS JOIN LATERAL json_object_keys(column_a::json) AS t(col) ORDER BY col)), ' text , '  ) || ' text'
);
I got an error message when I run it in pgadmin:
ERROR: prepared statement "format" does not exist SQL state: 26000 

Any advice on how to fix it? Thanks

--
Best Regards,
Joe

pgsql-sql by date:

Previous
From: Roberto Médola
Date:
Subject: Re: Bring to dead tuples to alive
Next
From: Pavel Stehule
Date:
Subject: Re: How to fix Execute format error?