Skip to content

Commit d7c7348

Browse files
committed
Reduce messages about implicit indexes and sequences to DEBUG1.
Per recent discussion on pgsql-hackers, these messages are too chatty for most users.
1 parent 3e00d33 commit d7c7348

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2
-250
lines changed

contrib/btree_gist/expected/not_equal.out

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ CREATE TABLE zoo (
3131
animal TEXT,
3232
EXCLUDE USING gist (cage WITH =, animal WITH <>)
3333
);
34-
NOTICE: CREATE TABLE / EXCLUDE will create implicit index "zoo_cage_animal_excl" for table "zoo"
3534
INSERT INTO zoo VALUES(123, 'zebra');
3635
INSERT INTO zoo VALUES(123, 'zebra');
3736
INSERT INTO zoo VALUES(123, 'lion');

contrib/citext/expected/citext.out

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ SELECT citext_cmp('B'::citext, 'a'::citext) > 0 AS true;
218218
CREATE TEMP TABLE try (
219219
name citext PRIMARY KEY
220220
);
221-
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "try_pkey" for table "try"
222221
INSERT INTO try (name)
223222
VALUES ('a'), ('ab'), ('â'), ('aba'), ('b'), ('ba'), ('bab'), ('AZ');
224223
SELECT name, 'a' = name AS eq_a FROM try WHERE name <> 'â';

contrib/citext/expected/citext_1.out

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ SELECT citext_cmp('B'::citext, 'a'::citext) > 0 AS true;
218218
CREATE TEMP TABLE try (
219219
name citext PRIMARY KEY
220220
);
221-
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "try_pkey" for table "try"
222221
INSERT INTO try (name)
223222
VALUES ('a'), ('ab'), ('â'), ('aba'), ('b'), ('ba'), ('bab'), ('AZ');
224223
SELECT name, 'a' = name AS eq_a FROM try WHERE name <> 'â';

contrib/dblink/expected/dblink.out

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
CREATE EXTENSION dblink;
22
CREATE TABLE foo(f1 int, f2 text, f3 text[], primary key (f1,f2));
3-
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "foo_pkey" for table "foo"
43
INSERT INTO foo VALUES (0,'a','{"a0","b0","c0"}');
54
INSERT INTO foo VALUES (1,'b','{"a1","b1","c1"}');
65
INSERT INTO foo VALUES (2,'c','{"a2","b2","c2"}');
@@ -56,7 +55,6 @@ ERROR: invalid attribute number 4
5655
-- retest using a quoted and schema qualified table
5756
CREATE SCHEMA "MySchema";
5857
CREATE TABLE "MySchema"."Foo"(f1 int, f2 text, f3 text[], primary key (f1,f2));
59-
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "Foo_pkey" for table "Foo"
6058
INSERT INTO "MySchema"."Foo" VALUES (0,'a','{"a0","b0","c0"}');
6159
-- list the primary key fields
6260
SELECT *
@@ -885,8 +883,6 @@ CREATE TEMP TABLE test_dropped
885883
col2 INT NOT NULL DEFAULT 112,
886884
col2b INT NOT NULL DEFAULT 113
887885
);
888-
NOTICE: CREATE TABLE will create implicit sequence "test_dropped_id_seq" for serial column "test_dropped.id"
889-
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "test_dropped_pkey" for table "test_dropped"
890886
INSERT INTO test_dropped VALUES(default);
891887
ALTER TABLE test_dropped
892888
DROP COLUMN col1,

contrib/pgstattuple/expected/pgstattuple.out

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ CREATE EXTENSION pgstattuple;
55
-- indexes should be that.
66
--
77
create table test (a int primary key);
8-
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "test_pkey" for table "test"
98
select * from pgstattuple('test'::text);
109
table_len | tuple_count | tuple_len | tuple_percent | dead_tuple_count | dead_tuple_len | dead_tuple_percent | free_space | free_percent
1110
-----------+-------------+-----------+---------------+------------------+----------------+--------------------+------------+--------------

contrib/sepgsql/expected/ddl.out

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ LOG: SELinux: allowed { create } scontext=unconfined_u:unconfined_r:unconfined_
2222
GRANT ALL ON SCHEMA regtest_schema TO regtest_sepgsql_test_user;
2323
SET search_path = regtest_schema, public;
2424
CREATE TABLE regtest_table (x serial primary key, y text);
25-
NOTICE: CREATE TABLE will create implicit sequence "regtest_table_x_seq" for serial column "regtest_table.x"
2625
LOG: SELinux: allowed { add_name } scontext=unconfined_u:unconfined_r:unconfined_t:s0 tcontext=unconfined_u:object_r:sepgsql_schema_t:s0 tclass=db_schema name="schema regtest_schema"
2726
LOG: SELinux: allowed { create } scontext=unconfined_u:unconfined_r:unconfined_t:s0 tcontext=unconfined_u:object_r:sepgsql_seq_t:s0 tclass=db_sequence name="sequence regtest_table_x_seq"
2827
LOG: SELinux: allowed { add_name } scontext=unconfined_u:unconfined_r:unconfined_t:s0 tcontext=unconfined_u:object_r:sepgsql_schema_t:s0 tclass=db_schema name="schema regtest_schema"
@@ -35,7 +34,6 @@ LOG: SELinux: allowed { create } scontext=unconfined_u:unconfined_r:unconfined_
3534
LOG: SELinux: allowed { create } scontext=unconfined_u:unconfined_r:unconfined_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_column name="table regtest_table column ctid"
3635
LOG: SELinux: allowed { create } scontext=unconfined_u:unconfined_r:unconfined_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_column name="table regtest_table column x"
3736
LOG: SELinux: allowed { create } scontext=unconfined_u:unconfined_r:unconfined_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_column name="table regtest_table column y"
38-
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "regtest_table_pkey" for table "regtest_table"
3937
ALTER TABLE regtest_table ADD COLUMN z int;
4038
LOG: SELinux: allowed { create } scontext=unconfined_u:unconfined_r:unconfined_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_column name="table regtest_table column z"
4139
CREATE TABLE regtest_table_2 (a int) WITH OIDS;
@@ -74,7 +72,6 @@ LOG: SELinux: allowed { create } scontext=unconfined_u:unconfined_r:unconfined_
7472
SET SESSION AUTHORIZATION regtest_sepgsql_test_user;
7573
SET search_path = regtest_schema, public;
7674
CREATE TABLE regtest_table_3 (x int, y serial);
77-
NOTICE: CREATE TABLE will create implicit sequence "regtest_table_3_y_seq" for serial column "regtest_table_3.y"
7875
LOG: SELinux: allowed { add_name } scontext=unconfined_u:unconfined_r:unconfined_t:s0 tcontext=unconfined_u:object_r:sepgsql_schema_t:s0 tclass=db_schema name="schema regtest_schema"
7976
LOG: SELinux: allowed { create } scontext=unconfined_u:unconfined_r:unconfined_t:s0 tcontext=unconfined_u:object_r:sepgsql_seq_t:s0 tclass=db_sequence name="sequence regtest_table_3_y_seq"
8077
LOG: SELinux: allowed { add_name } scontext=unconfined_u:unconfined_r:unconfined_t:s0 tcontext=unconfined_u:object_r:sepgsql_schema_t:s0 tclass=db_schema name="schema regtest_schema"

contrib/sepgsql/expected/dml.out

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ SECURITY LABEL ON COLUMN t5.e IS 'system_u:object_r:sepgsql_table_t:s0';
2222
SECURITY LABEL ON COLUMN t5.f IS 'system_u:object_r:sepgsql_ro_table_t:s0';
2323
SECURITY LABEL ON COLUMN t5.g IS 'system_u:object_r:sepgsql_secret_table_t:s0';
2424
CREATE TABLE customer (cid int primary key, cname text, ccredit text);
25-
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "customer_pkey" for table "customer"
2625
SECURITY LABEL ON COLUMN customer.ccredit IS 'system_u:object_r:sepgsql_secret_table_t:s0';
2726
INSERT INTO customer VALUES (1, 'Taro', '1111-2222-3333-4444'),
2827
(2, 'Hanako', '5555-6666-7777-8888');

contrib/tablefunc/expected/tablefunc.out

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ SELECT * FROM crosstab_out('SELECT rowid, attribute, val FROM ct where rowclass
146146
-- hash based crosstab
147147
--
148148
create table cth(id serial, rowid text, rowdt timestamp, attribute text, val text);
149-
NOTICE: CREATE TABLE will create implicit sequence "cth_id_seq" for serial column "cth.id"
150149
insert into cth values(DEFAULT,'test1','01 March 2003','temperature','42');
151150
insert into cth values(DEFAULT,'test1','01 March 2003','test_result','PASS');
152151
-- the next line is intentionally left commented and is therefore a "missing" attribute

doc/src/sgml/tcn.sgml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ test(# b date not null,
4444
test(# c text,
4545
test(# primary key (a, b)
4646
test(# );
47-
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "tcndata_pkey" for table "tcndata"
4847
CREATE TABLE
4948
test=# create trigger tcndata_tcn_trigger
5049
test-# after insert or update or delete on tcndata

src/backend/commands/indexcmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ DefineIndex(RangeVar *heapRelation,
593593
constraint_type = NULL; /* keep compiler quiet */
594594
}
595595

596-
ereport(NOTICE,
596+
ereport(DEBUG1,
597597
(errmsg("%s %s will create implicit index \"%s\" for table \"%s\"",
598598
is_alter_table ? "ALTER TABLE / ADD" : "CREATE TABLE /",
599599
constraint_type,

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