Phil Endecott wrote:
> !! execute ''column_values :=
> !! column_values || quote_literal(r.'' || cr.column_name || '')'';
I'm guessing you want something like
FOR rec IN EXECUTE ''select column_values || quote_literal(r.'' || cr.column_name || '') alias column_values''; LOOP
column_values := rec.column_values;
END LOOP;
another suggestion, rather than do
> if not first then
> column_names := column_names || '', '';
> column_values := column_values || '', '';
> first := false;
> end if;
why not use two arrays and append the name/values using array_append() and use array_to_string() to join them after that?
--
basic