Skip to content

Commit a8ae188

Browse files
committed
hide NOTICE messages using GUC magic
1 parent ee9ccbc commit a8ae188

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/partition_creation.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,15 @@ create_table_using_stmt(CreateStmt *create_stmt, Oid relowner)
668668
ObjectAddress table_addr;
669669
Datum toast_options;
670670
static char *validnsps[] = HEAP_RELOPT_NAMESPACES;
671+
int guc_level;
672+
673+
/* Create new GUC level... */
674+
guc_level = NewGUCNestLevel();
675+
676+
/* ... and set client_min_messages = WARNING */
677+
(void) set_config_option("client_min_messages", "WARNING",
678+
PGC_USERSET, PGC_S_SESSION,
679+
GUC_ACTION_SAVE, true, 0, false);
671680

672681
/* Create new partition owned by parent's posessor */
673682
table_addr = DefineRelation(create_stmt, RELKIND_RELATION, relowner, NULL);
@@ -693,6 +702,9 @@ create_table_using_stmt(CreateStmt *create_stmt, Oid relowner)
693702
/* Now create the toast table if needed */
694703
NewRelationCreateToastTable(table_addr.objectId, toast_options);
695704

705+
/* Restore original GUC values */
706+
AtEOXact_GUC(true, guc_level);
707+
696708
/* Return the address */
697709
return table_addr;
698710
}

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