Avoid double-quoting

Since dst_schema is a REGNAMESPACE, it is automatically quoted when casted to TEXT
This commit is contained in:
Javier Goizueta
2019-07-03 18:34:54 +02:00
parent c07784566a
commit 7bdee5c13e

View File

@@ -127,7 +127,7 @@ DECLARE
t timestamptz;
BEGIN
-- If the destination table does not exist, just copy the source table
fq_dest_table := format('%I.%I', dst_schema, dst_table);
fq_dest_table := format('%s.%I', dst_schema, dst_table);
EXECUTE format('CREATE TABLE IF NOT EXISTS %s as TABLE %I', fq_dest_table, src_table);
GET DIAGNOSTICS num_rows = ROW_COUNT;
IF num_rows > 0 THEN