Suppose the block below:
do $$
declare
v_table_name text:='table_name';
v_column_name text:='column_name';
v_record record;
v_sql_dynamic text;
v_enum_xml xml;
v_string text;
begin
v_sql_dynamic:=format('select %s from %s',v_column_name,v_table_name);
FOR v_record IN EXECUTE v_sql_dynamic
LOOP
raise notice 'field with name % has a value of %',v_column_name,***?????***;
END LOOP;
end;
$$ language plpgsql
How do I get access to the field of v_record in the way like: v_record.v_column_name
?