I want to run a query which is saved in a string, for example: str='select 753 as number'
I tried exec sql but am getting this error:
EXEC SQL EXECUTE IMMEDIATE str
Also I am using it in a postgresql function. SO I have a dynamic query in a string. How can I run query in a string which can be returned as cursor. Something like this:
prepare strg as 'select 7777 as number';
open fcur for execute strg;
can it be done?
execute: postgresql.org/docs/current/static/…