* Pass a schema name and table name dynamically in FROM in a select query in postgres.
* I need to call a table dynamically in a from (in the select clause)

```sql
CREATE OR REPLACE FUNCTION xx.fn_build_test_(
    IN p_var_archive_schema character varying,
    IN p_var_archive_table character varying)

 RETURNS record AS
 $BODY$
   declare

l_var_archive_schema  VARCHAR;
l_var_archive_table VARCHAR; 
l_var_test VARCHAR[];

BEGIN

l_var_archive_schema  := p_var_archive_schema;
l_var_archive_table   := p_var_archive_table;

SELECT  array
( SELECT TO_CHAR(column_name,'YYYYMMDD')
 FROM "test_table"
 WHERE col1 = 1)
 INTO l_var_test;

END;
$BODY$
LANGUAGE plpgsql
VOLATILE SECURITY INVOKER; 

```

I need values for: 

  l\_var\_archive\_schema VARCHAR;  

  l\_var\_archive\_table VARCHAR; 

in place of the test table