     IF NOT (parent_table = ANY($3)) THEN
       ref_to_parent_path := citydb_pkg.create_delete_function(parent_table, $2, $3);
     END IF;
-    parent_block := parent_block
-      || E'\n  -- delete '||parent_table
+    parent_block :=
+         E'\n  -- delete '||parent_table
       || E'\n  PERFORM '||$2||'.delete_'||citydb_pkg.get_short_name(parent_table)||E'(deleted_id, 0);\n';
   END IF;
 

      vars := vars || E'\n  ' || citydb_pkg.get_short_name(rec.ref_table_name) || '_ids int[] := ''{}'';';
      returning_block := returning_block || ','
        || E'\n    ARRAY['
        || E'\n    ' || array_to_string(rec.fk_columns, E',\n    ')
        || E'\n    ]';
      into_block := into_block || E',\n    ' || citydb_pkg.get_short_name(rec.ref_table_name)||'_ids';
    ELSE
      vars := vars || E'\n  ' || citydb_pkg.get_short_name(rec.ref_table_name)||'_ref_id int;';
      returning_block := returning_block || E',\n      ' || array_to_string(rec.fk_columns, E',\n      ');
      into_block := into_block || E',\n    ' || citydb_pkg.get_short_name(rec.ref_table_name) || '_ref_id';
    END IF;


  schema_name TEXT DEFAULT 'citydb'
  ) RETURNS TEXT AS
$$
SELECT
  f.confrelid::regclass::text AS parent_table
FROM
  pg_constraint f,
