Skip to content

Commit 5d7d83d

Browse files
committed
range.sql: drop redundant check for existing tables
The check is always false as v_child_relname is schema-qualified while the comparison is to a plain table name. The entire check can be removed instead of fixing it as a few lines above we have a loop which comes up with a unique name.
1 parent 754e320 commit 5d7d83d

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_tables WHERE tablename = v_child_relname) THEN
451-
RAISE WARNING 'Relation % already exists, skipping...', v_child_relname;
452-
RETURN NULL;
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy