I am trying to fetch data from remote db by using dblink through function but getting an error \"query has no destination for result data\". I am using plpgsql language to d
Use a plain SQL function instead of PL/PgSQL, or use SELECT INTO and ordinary RETURN.
SELECT INTO
RETURN