Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Reduce messages about implicit indexes and sequences to DEBUG1.
Per recent discussion on pgsql-hackers, these messages are too
chatty for most users.
  • Loading branch information
robertmhaas committed Jul 5, 2012
1 parent 3e00d33 commit d7c7348
Show file tree
Hide file tree
Showing 55 changed files with 2 additions and 250 deletions.
1 change: 0 additions & 1 deletion contrib/btree_gist/expected/not_equal.out
Expand Up @@ -31,7 +31,6 @@ CREATE TABLE zoo (
animal TEXT, animal TEXT,
EXCLUDE USING gist (cage WITH =, animal WITH <>) EXCLUDE USING gist (cage WITH =, animal WITH <>)
); );
NOTICE: CREATE TABLE / EXCLUDE will create implicit index "zoo_cage_animal_excl" for table "zoo"
INSERT INTO zoo VALUES(123, 'zebra'); INSERT INTO zoo VALUES(123, 'zebra');
INSERT INTO zoo VALUES(123, 'zebra'); INSERT INTO zoo VALUES(123, 'zebra');
INSERT INTO zoo VALUES(123, 'lion'); INSERT INTO zoo VALUES(123, 'lion');
Expand Down
1 change: 0 additions & 1 deletion contrib/citext/expected/citext.out
Expand Up @@ -218,7 +218,6 @@ SELECT citext_cmp('B'::citext, 'a'::citext) > 0 AS true;
CREATE TEMP TABLE try ( CREATE TEMP TABLE try (
name citext PRIMARY KEY name citext PRIMARY KEY
); );
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "try_pkey" for table "try"
INSERT INTO try (name) INSERT INTO try (name)
VALUES ('a'), ('ab'), ('â'), ('aba'), ('b'), ('ba'), ('bab'), ('AZ'); VALUES ('a'), ('ab'), ('â'), ('aba'), ('b'), ('ba'), ('bab'), ('AZ');
SELECT name, 'a' = name AS eq_a FROM try WHERE name <> 'â'; SELECT name, 'a' = name AS eq_a FROM try WHERE name <> 'â';
Expand Down
1 change: 0 additions & 1 deletion contrib/citext/expected/citext_1.out
Expand Up @@ -218,7 +218,6 @@ SELECT citext_cmp('B'::citext, 'a'::citext) > 0 AS true;
CREATE TEMP TABLE try ( CREATE TEMP TABLE try (
name citext PRIMARY KEY name citext PRIMARY KEY
); );
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "try_pkey" for table "try"
INSERT INTO try (name) INSERT INTO try (name)
VALUES ('a'), ('ab'), ('â'), ('aba'), ('b'), ('ba'), ('bab'), ('AZ'); VALUES ('a'), ('ab'), ('â'), ('aba'), ('b'), ('ba'), ('bab'), ('AZ');
SELECT name, 'a' = name AS eq_a FROM try WHERE name <> 'â'; SELECT name, 'a' = name AS eq_a FROM try WHERE name <> 'â';
Expand Down
4 changes: 0 additions & 4 deletions contrib/dblink/expected/dblink.out
@@ -1,6 +1,5 @@
CREATE EXTENSION dblink; CREATE EXTENSION dblink;
CREATE TABLE foo(f1 int, f2 text, f3 text[], primary key (f1,f2)); CREATE TABLE foo(f1 int, f2 text, f3 text[], primary key (f1,f2));
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "foo_pkey" for table "foo"
INSERT INTO foo VALUES (0,'a','{"a0","b0","c0"}'); INSERT INTO foo VALUES (0,'a','{"a0","b0","c0"}');
INSERT INTO foo VALUES (1,'b','{"a1","b1","c1"}'); INSERT INTO foo VALUES (1,'b','{"a1","b1","c1"}');
INSERT INTO foo VALUES (2,'c','{"a2","b2","c2"}'); INSERT INTO foo VALUES (2,'c','{"a2","b2","c2"}');
Expand Down Expand Up @@ -56,7 +55,6 @@ ERROR: invalid attribute number 4
-- retest using a quoted and schema qualified table -- retest using a quoted and schema qualified table
CREATE SCHEMA "MySchema"; CREATE SCHEMA "MySchema";
CREATE TABLE "MySchema"."Foo"(f1 int, f2 text, f3 text[], primary key (f1,f2)); CREATE TABLE "MySchema"."Foo"(f1 int, f2 text, f3 text[], primary key (f1,f2));
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "Foo_pkey" for table "Foo"
INSERT INTO "MySchema"."Foo" VALUES (0,'a','{"a0","b0","c0"}'); INSERT INTO "MySchema"."Foo" VALUES (0,'a','{"a0","b0","c0"}');
-- list the primary key fields -- list the primary key fields
SELECT * SELECT *
Expand Down Expand Up @@ -885,8 +883,6 @@ CREATE TEMP TABLE test_dropped
col2 INT NOT NULL DEFAULT 112, col2 INT NOT NULL DEFAULT 112,
col2b INT NOT NULL DEFAULT 113 col2b INT NOT NULL DEFAULT 113
); );
NOTICE: CREATE TABLE will create implicit sequence "test_dropped_id_seq" for serial column "test_dropped.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "test_dropped_pkey" for table "test_dropped"
INSERT INTO test_dropped VALUES(default); INSERT INTO test_dropped VALUES(default);
ALTER TABLE test_dropped ALTER TABLE test_dropped
DROP COLUMN col1, DROP COLUMN col1,
Expand Down
1 change: 0 additions & 1 deletion contrib/pgstattuple/expected/pgstattuple.out
Expand Up @@ -5,7 +5,6 @@ CREATE EXTENSION pgstattuple;
-- indexes should be that. -- indexes should be that.
-- --
create table test (a int primary key); create table test (a int primary key);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "test_pkey" for table "test"
select * from pgstattuple('test'::text); select * from pgstattuple('test'::text);
table_len | tuple_count | tuple_len | tuple_percent | dead_tuple_count | dead_tuple_len | dead_tuple_percent | free_space | free_percent table_len | tuple_count | tuple_len | tuple_percent | dead_tuple_count | dead_tuple_len | dead_tuple_percent | free_space | free_percent
-----------+-------------+-----------+---------------+------------------+----------------+--------------------+------------+-------------- -----------+-------------+-----------+---------------+------------------+----------------+--------------------+------------+--------------
Expand Down
3 changes: 0 additions & 3 deletions contrib/sepgsql/expected/ddl.out
Expand Up @@ -22,7 +22,6 @@ LOG: SELinux: allowed { create } scontext=unconfined_u:unconfined_r:unconfined_
GRANT ALL ON SCHEMA regtest_schema TO regtest_sepgsql_test_user; GRANT ALL ON SCHEMA regtest_schema TO regtest_sepgsql_test_user;
SET search_path = regtest_schema, public; SET search_path = regtest_schema, public;
CREATE TABLE regtest_table (x serial primary key, y text); CREATE TABLE regtest_table (x serial primary key, y text);
NOTICE: CREATE TABLE will create implicit sequence "regtest_table_x_seq" for serial column "regtest_table.x"
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" 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"
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" 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"
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" 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"
Expand All @@ -35,7 +34,6 @@ LOG: SELinux: allowed { create } scontext=unconfined_u:unconfined_r:unconfined_
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" 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"
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" 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"
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" 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"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "regtest_table_pkey" for table "regtest_table"
ALTER TABLE regtest_table ADD COLUMN z int; ALTER TABLE regtest_table ADD COLUMN z int;
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" 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"
CREATE TABLE regtest_table_2 (a int) WITH OIDS; CREATE TABLE regtest_table_2 (a int) WITH OIDS;
Expand Down Expand Up @@ -74,7 +72,6 @@ LOG: SELinux: allowed { create } scontext=unconfined_u:unconfined_r:unconfined_
SET SESSION AUTHORIZATION regtest_sepgsql_test_user; SET SESSION AUTHORIZATION regtest_sepgsql_test_user;
SET search_path = regtest_schema, public; SET search_path = regtest_schema, public;
CREATE TABLE regtest_table_3 (x int, y serial); CREATE TABLE regtest_table_3 (x int, y serial);
NOTICE: CREATE TABLE will create implicit sequence "regtest_table_3_y_seq" for serial column "regtest_table_3.y"
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" 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"
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" 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"
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" 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"
Expand Down
1 change: 0 additions & 1 deletion contrib/sepgsql/expected/dml.out
Expand Up @@ -22,7 +22,6 @@ SECURITY LABEL ON COLUMN t5.e IS 'system_u:object_r:sepgsql_table_t:s0';
SECURITY LABEL ON COLUMN t5.f IS 'system_u:object_r:sepgsql_ro_table_t:s0'; SECURITY LABEL ON COLUMN t5.f IS 'system_u:object_r:sepgsql_ro_table_t:s0';
SECURITY LABEL ON COLUMN t5.g IS 'system_u:object_r:sepgsql_secret_table_t:s0'; SECURITY LABEL ON COLUMN t5.g IS 'system_u:object_r:sepgsql_secret_table_t:s0';
CREATE TABLE customer (cid int primary key, cname text, ccredit text); CREATE TABLE customer (cid int primary key, cname text, ccredit text);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "customer_pkey" for table "customer"
SECURITY LABEL ON COLUMN customer.ccredit IS 'system_u:object_r:sepgsql_secret_table_t:s0'; SECURITY LABEL ON COLUMN customer.ccredit IS 'system_u:object_r:sepgsql_secret_table_t:s0';
INSERT INTO customer VALUES (1, 'Taro', '1111-2222-3333-4444'), INSERT INTO customer VALUES (1, 'Taro', '1111-2222-3333-4444'),
(2, 'Hanako', '5555-6666-7777-8888'); (2, 'Hanako', '5555-6666-7777-8888');
Expand Down
1 change: 0 additions & 1 deletion contrib/tablefunc/expected/tablefunc.out
Expand Up @@ -146,7 +146,6 @@ SELECT * FROM crosstab_out('SELECT rowid, attribute, val FROM ct where rowclass
-- hash based crosstab -- hash based crosstab
-- --
create table cth(id serial, rowid text, rowdt timestamp, attribute text, val text); create table cth(id serial, rowid text, rowdt timestamp, attribute text, val text);
NOTICE: CREATE TABLE will create implicit sequence "cth_id_seq" for serial column "cth.id"
insert into cth values(DEFAULT,'test1','01 March 2003','temperature','42'); insert into cth values(DEFAULT,'test1','01 March 2003','temperature','42');
insert into cth values(DEFAULT,'test1','01 March 2003','test_result','PASS'); insert into cth values(DEFAULT,'test1','01 March 2003','test_result','PASS');
-- the next line is intentionally left commented and is therefore a "missing" attribute -- the next line is intentionally left commented and is therefore a "missing" attribute
Expand Down
1 change: 0 additions & 1 deletion doc/src/sgml/tcn.sgml
Expand Up @@ -44,7 +44,6 @@ test(# b date not null,
test(# c text, test(# c text,
test(# primary key (a, b) test(# primary key (a, b)
test(# ); test(# );
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "tcndata_pkey" for table "tcndata"
CREATE TABLE CREATE TABLE
test=# create trigger tcndata_tcn_trigger test=# create trigger tcndata_tcn_trigger
test-# after insert or update or delete on tcndata test-# after insert or update or delete on tcndata
Expand Down
2 changes: 1 addition & 1 deletion src/backend/commands/indexcmds.c
Expand Up @@ -593,7 +593,7 @@ DefineIndex(RangeVar *heapRelation,
constraint_type = NULL; /* keep compiler quiet */ constraint_type = NULL; /* keep compiler quiet */
} }


ereport(NOTICE, ereport(DEBUG1,
(errmsg("%s %s will create implicit index \"%s\" for table \"%s\"", (errmsg("%s %s will create implicit index \"%s\" for table \"%s\"",
is_alter_table ? "ALTER TABLE / ADD" : "CREATE TABLE /", is_alter_table ? "ALTER TABLE / ADD" : "CREATE TABLE /",
constraint_type, constraint_type,
Expand Down
2 changes: 1 addition & 1 deletion src/backend/parser/parse_utilcmd.c
Expand Up @@ -379,7 +379,7 @@ transformColumnDefinition(CreateStmtContext *cxt, ColumnDef *column)
"seq", "seq",
snamespaceid); snamespaceid);


ereport(NOTICE, ereport(DEBUG1,
(errmsg("%s will create implicit sequence \"%s\" for serial column \"%s.%s\"", (errmsg("%s will create implicit sequence \"%s\" for serial column \"%s.%s\"",
cxt->stmtType, sname, cxt->stmtType, sname,
cxt->relation->relname, column->colname))); cxt->relation->relname, column->colname)));
Expand Down
1 change: 0 additions & 1 deletion src/pl/plpython/expected/plpython_error.out
Expand Up @@ -318,7 +318,6 @@ PL/Python function "sql_from_python_error"
CREATE TABLE specific ( CREATE TABLE specific (
i integer PRIMARY KEY i integer PRIMARY KEY
); );
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "specific_pkey" for table "specific"
CREATE FUNCTION specific_exception(i integer) RETURNS void AS CREATE FUNCTION specific_exception(i integer) RETURNS void AS
$$ $$
from plpy import spiexceptions from plpy import spiexceptions
Expand Down
1 change: 0 additions & 1 deletion src/pl/plpython/expected/plpython_error_0.out
Expand Up @@ -318,7 +318,6 @@ PL/Python function "sql_from_python_error"
CREATE TABLE specific ( CREATE TABLE specific (
i integer PRIMARY KEY i integer PRIMARY KEY
); );
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "specific_pkey" for table "specific"
CREATE FUNCTION specific_exception(i integer) RETURNS void AS CREATE FUNCTION specific_exception(i integer) RETURNS void AS
$$ $$
from plpy import spiexceptions from plpy import spiexceptions
Expand Down
10 changes: 0 additions & 10 deletions src/pl/plpython/expected/plpython_schema.out
Expand Up @@ -5,8 +5,6 @@ CREATE TABLE users (
userid serial, userid serial,
PRIMARY KEY(lname, fname) PRIMARY KEY(lname, fname)
) ; ) ;
NOTICE: CREATE TABLE will create implicit sequence "users_userid_seq" for serial column "users.userid"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "users_pkey" for table "users"
CREATE INDEX users_username_idx ON users(username); CREATE INDEX users_username_idx ON users(username);
CREATE INDEX users_fname_idx ON users(fname); CREATE INDEX users_fname_idx ON users(fname);
CREATE INDEX users_lname_idx ON users(lname); CREATE INDEX users_lname_idx ON users(lname);
Expand All @@ -15,26 +13,18 @@ CREATE TABLE taxonomy (
id serial primary key, id serial primary key,
name text unique name text unique
) ; ) ;
NOTICE: CREATE TABLE will create implicit sequence "taxonomy_id_seq" for serial column "taxonomy.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "taxonomy_pkey" for table "taxonomy"
NOTICE: CREATE TABLE / UNIQUE will create implicit index "taxonomy_name_key" for table "taxonomy"
CREATE TABLE entry ( CREATE TABLE entry (
accession text not null primary key, accession text not null primary key,
eid serial unique, eid serial unique,
txid int2 not null references taxonomy(id) txid int2 not null references taxonomy(id)
) ; ) ;
NOTICE: CREATE TABLE will create implicit sequence "entry_eid_seq" for serial column "entry.eid"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "entry_pkey" for table "entry"
NOTICE: CREATE TABLE / UNIQUE will create implicit index "entry_eid_key" for table "entry"
CREATE TABLE sequences ( CREATE TABLE sequences (
eid int4 not null references entry(eid), eid int4 not null references entry(eid),
pid serial primary key, pid serial primary key,
product text not null, product text not null,
sequence text not null, sequence text not null,
multipart bool default 'false' multipart bool default 'false'
) ; ) ;
NOTICE: CREATE TABLE will create implicit sequence "sequences_pid_seq" for serial column "sequences.pid"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "sequences_pkey" for table "sequences"
CREATE INDEX sequences_product_idx ON sequences(product) ; CREATE INDEX sequences_product_idx ON sequences(product) ;
CREATE TABLE xsequences ( CREATE TABLE xsequences (
pid int4 not null references sequences(pid), pid int4 not null references sequences(pid),
Expand Down
1 change: 0 additions & 1 deletion src/pl/plpython/expected/plpython_subtransaction.out
Expand Up @@ -384,7 +384,6 @@ SELECT * FROM subtransaction_tbl;


TRUNCATE subtransaction_tbl; TRUNCATE subtransaction_tbl;
ALTER TABLE subtransaction_tbl ADD PRIMARY KEY (i); ALTER TABLE subtransaction_tbl ADD PRIMARY KEY (i);
NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index "subtransaction_tbl_pkey" for table "subtransaction_tbl"
CREATE FUNCTION pk_violation_inside_subtransaction() RETURNS void CREATE FUNCTION pk_violation_inside_subtransaction() RETURNS void
AS $$ AS $$
with plpy.subtransaction(): with plpy.subtransaction():
Expand Down
1 change: 0 additions & 1 deletion src/pl/plpython/expected/plpython_subtransaction_0.out
Expand Up @@ -359,7 +359,6 @@ SELECT * FROM subtransaction_tbl;


TRUNCATE subtransaction_tbl; TRUNCATE subtransaction_tbl;
ALTER TABLE subtransaction_tbl ADD PRIMARY KEY (i); ALTER TABLE subtransaction_tbl ADD PRIMARY KEY (i);
NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index "subtransaction_tbl_pkey" for table "subtransaction_tbl"
CREATE FUNCTION pk_violation_inside_subtransaction() RETURNS void CREATE FUNCTION pk_violation_inside_subtransaction() RETURNS void
AS $$ AS $$
with plpy.subtransaction(): with plpy.subtransaction():
Expand Down
1 change: 0 additions & 1 deletion src/pl/plpython/expected/plpython_subtransaction_5.out
Expand Up @@ -359,7 +359,6 @@ SELECT * FROM subtransaction_tbl;


TRUNCATE subtransaction_tbl; TRUNCATE subtransaction_tbl;
ALTER TABLE subtransaction_tbl ADD PRIMARY KEY (i); ALTER TABLE subtransaction_tbl ADD PRIMARY KEY (i);
NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index "subtransaction_tbl_pkey" for table "subtransaction_tbl"
CREATE FUNCTION pk_violation_inside_subtransaction() RETURNS void CREATE FUNCTION pk_violation_inside_subtransaction() RETURNS void
AS $$ AS $$
with plpy.subtransaction(): with plpy.subtransaction():
Expand Down

0 comments on commit d7c7348

Please sign in to comment.