File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 8
8
-- Yes, malicious user might have another extension containing 'pg_shardman'...
9
9
-- Probably better just call no-op func from the library
10
10
IF strpos(current_setting(' shared_preload_libraries' ), ' pg_shardman' ) = 0 THEN
11
- RAISE EXCEPTION ' pg_shardman must be loaded via shared_preload_libraries. Refusing to proceed.' ;
11
+ RAISE EXCEPTION ' pg_shardman must be loaded via shared_preload_libraries. Refusing to
12
+ proceed.' ;
12
13
END IF;
13
14
END
14
15
$$;
@@ -178,12 +179,13 @@ BEGIN
178
179
-- and dangerous: what if table was created and dropped before this
179
180
-- change reached us?
180
181
181
- EXECUTE format(' CREATE FOREIGN TABLE %I %s SERVER %I' ,
182
+ EXECUTE format(' CREATE FOREIGN TABLE %I %s SERVER %I OPTIONS (table_name %L) ' ,
182
183
fdw_part_name,
183
184
(SELECT
184
185
shardman .reconstruct_table_attrs (
185
186
format(' %I' , NEW .part_name ))),
186
- NEW .part_name );
187
+ NEW .part_name ,
188
+ NEW .part_name );
187
189
-- Finally, replace empty local tmp partition with foreign table
188
190
EXECUTE format(' SELECT replace_hash_partition(%L, %L)' ,
189
191
NEW .part_name , fdw_part_name);
You can’t perform that action at this time.
0 commit comments