Create table t1 ( xcheck varchar, name text ); CREATE OR REPLACE FUNCTION fn_acgroup(xch varchar) RETURNS record AS DECLARE xrc as record; execute 'select name from t1 where xcheck @> ''' || xch :: varchar || ''';' into xrc; return xrc; END;
t1 having array value and text. I am calling this(
fn_acgroup) function with array as its parameter value. In that function, I am checking the array value with passed array if it matches then I will return the
name. In that case I get error as
operator does not exist: text || character varying. Am I doing anything wrong? How can I solve this problem?