Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5d7d83d

Browse files
committed
range.sql: drop redundant check for existing tables
The check is always false as v_child_relname is schema-qualified while thecomparison is to a plain table name. The entire check can be removedinstead of fixing it as a few lines above we have a loop which comes up witha unique name.
1 parent754e320 commit5d7d83d

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

‎range.sql

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -446,12 +446,6 @@ BEGIN
446446
EXIT WHEN v_child_relname_exists=0;
447447
END LOOP;
448448

449-
/* Skip existing partitions*/
450-
IF EXISTS (SELECT*FROM pg_tablesWHERE tablename= v_child_relname) THEN
451-
RAISE WARNING'Relation % already exists, skipping...', v_child_relname;
452-
RETURNNULL;
453-
END IF;
454-
455449
EXECUTE format('CREATE TABLE %s (LIKE %s INCLUDING ALL)'
456450
, v_child_relname
457451
, p_parent);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp