Permalink
Browse files

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...
Robert Haas
Robert Haas committed Jul 5, 2012
1 parent 3e00d33 commit d7c734841b3e6cb44de363a8a3d83c35b75b30d9
Showing with 2 additions and 250 deletions.
  1. +0 −1 contrib/btree_gist/expected/not_equal.out
  2. +0 −1 contrib/citext/expected/citext.out
  3. +0 −1 contrib/citext/expected/citext_1.out
  4. +0 −4 contrib/dblink/expected/dblink.out
  5. +0 −1 contrib/pgstattuple/expected/pgstattuple.out
  6. +0 −3 contrib/sepgsql/expected/ddl.out
  7. +0 −1 contrib/sepgsql/expected/dml.out
  8. +0 −1 contrib/tablefunc/expected/tablefunc.out
  9. +0 −1 doc/src/sgml/tcn.sgml
  10. +1 −1 src/backend/commands/indexcmds.c
  11. +1 −1 src/backend/parser/parse_utilcmd.c
  12. +0 −1 src/pl/plpython/expected/plpython_error.out
  13. +0 −1 src/pl/plpython/expected/plpython_error_0.out
  14. +0 −10 src/pl/plpython/expected/plpython_schema.out
  15. +0 −1 src/pl/plpython/expected/plpython_subtransaction.out
  16. +0 −1 src/pl/plpython/expected/plpython_subtransaction_0.out
  17. +0 −1 src/pl/plpython/expected/plpython_subtransaction_5.out
  18. +0 −28 src/test/regress/expected/alter_table.out
  19. +0 −1 src/test/regress/expected/arrays.out
  20. +0 −9 src/test/regress/expected/cluster.out
  21. +0 −1 src/test/regress/expected/collate.out
  22. +0 −1 src/test/regress/expected/copy2.out
  23. +0 −2 src/test/regress/expected/copyselect.out
  24. +0 −5 src/test/regress/expected/create_table.out
  25. +0 −7 src/test/regress/expected/create_table_like.out
  26. +0 −2 src/test/regress/expected/delete.out
  27. +0 −7 src/test/regress/expected/dependency.out
  28. +0 −1 src/test/regress/expected/domain.out
  29. +0 −1 src/test/regress/expected/enum.out
  30. +0 −1 src/test/regress/expected/foreign_data.out
  31. +0 −46 src/test/regress/expected/foreign_key.out
  32. +0 −9 src/test/regress/expected/functional_deps.out
  33. +0 −6 src/test/regress/expected/inherit.out
  34. +0 −14 src/test/regress/expected/join.out
  35. +0 −2 src/test/regress/expected/namespace.out
  36. +0 −3 src/test/regress/expected/plpgsql.out
  37. +0 −4 src/test/regress/expected/rangefuncs.out
  38. +0 −2 src/test/regress/expected/rangetypes.out
  39. +0 −1 src/test/regress/expected/returning.out
  40. +0 −2 src/test/regress/expected/rowtypes.out
  41. +0 −9 src/test/regress/expected/rules.out
  42. +0 −1 src/test/regress/expected/select_views.out
  43. +0 −1 src/test/regress/expected/select_views_1.out
  44. +0 −7 src/test/regress/expected/sequence.out
  45. +0 −7 src/test/regress/expected/sequence_1.out
  46. +0 −3 src/test/regress/expected/subselect.out
  47. +0 −2 src/test/regress/expected/temp.out
  48. +0 −2 src/test/regress/expected/transactions.out
  49. +0 −10 src/test/regress/expected/triggers.out
  50. +0 −5 src/test/regress/expected/truncate.out
  51. +0 −3 src/test/regress/expected/typed_table.out
  52. +0 −1 src/test/regress/expected/union.out
  53. +0 −1 src/test/regress/expected/vacuum.out
  54. +0 −2 src/test/regress/expected/with.out
  55. +0 −10 src/test/regress/output/constraints.source
@@ -31,7 +31,6 @@ CREATE TABLE zoo (
animal TEXT,
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, 'lion');
@@ -218,7 +218,6 @@ SELECT citext_cmp('B'::citext, 'a'::citext) > 0 AS true;
CREATE TEMP TABLE try (
name citext PRIMARY KEY
);
-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "try_pkey" for table "try"
INSERT INTO try (name)
VALUES ('a'), ('ab'), ('â'), ('aba'), ('b'), ('ba'), ('bab'), ('AZ');
SELECT name, 'a' = name AS eq_a FROM try WHERE name <> 'â';
@@ -218,7 +218,6 @@ SELECT citext_cmp('B'::citext, 'a'::citext) > 0 AS true;
CREATE TEMP TABLE try (
name citext PRIMARY KEY
);
-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "try_pkey" for table "try"
INSERT INTO try (name)
VALUES ('a'), ('ab'), ('â'), ('aba'), ('b'), ('ba'), ('bab'), ('AZ');
SELECT name, 'a' = name AS eq_a FROM try WHERE name <> 'â';
@@ -1,6 +1,5 @@
CREATE EXTENSION dblink;
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 (1,'b','{"a1","b1","c1"}');
INSERT INTO foo VALUES (2,'c','{"a2","b2","c2"}');
@@ -56,7 +55,6 @@ ERROR: invalid attribute number 4
-- retest using a quoted and schema qualified table
CREATE SCHEMA "MySchema";
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"}');
-- list the primary key fields
SELECT *
@@ -885,8 +883,6 @@ CREATE TEMP TABLE test_dropped
col2 INT NOT NULL DEFAULT 112,
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);
ALTER TABLE test_dropped
DROP COLUMN col1,
@@ -5,7 +5,6 @@ CREATE EXTENSION pgstattuple;
-- indexes should be that.
--
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);
table_len | tuple_count | tuple_len | tuple_percent | dead_tuple_count | dead_tuple_len | dead_tuple_percent | free_space | free_percent
-----------+-------------+-----------+---------------+------------------+----------------+--------------------+------------+--------------
@@ -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;
SET search_path = regtest_schema, public;
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 { 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"
@@ -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 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"
-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "regtest_table_pkey" for table "regtest_table"
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"
CREATE TABLE regtest_table_2 (a int) WITH OIDS;
@@ -74,7 +72,6 @@ LOG: SELinux: allowed { create } scontext=unconfined_u:unconfined_r:unconfined_
SET SESSION AUTHORIZATION regtest_sepgsql_test_user;
SET search_path = regtest_schema, public;
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 { 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"
@@ -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.g IS 'system_u:object_r:sepgsql_secret_table_t:s0';
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';
INSERT INTO customer VALUES (1, 'Taro', '1111-2222-3333-4444'),
(2, 'Hanako', '5555-6666-7777-8888');
@@ -146,7 +146,6 @@ SELECT * FROM crosstab_out('SELECT rowid, attribute, val FROM ct where rowclass
-- hash based crosstab
--
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','test_result','PASS');
-- the next line is intentionally left commented and is therefore a "missing" attribute
View
@@ -44,7 +44,6 @@ test(# b date not null,
test(# c text,
test(# primary key (a, b)
test(# );
-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "tcndata_pkey" for table "tcndata"
CREATE TABLE
test=# create trigger tcndata_tcn_trigger
test-# after insert or update or delete on tcndata
@@ -593,7 +593,7 @@ DefineIndex(RangeVar *heapRelation,
constraint_type = NULL; /* keep compiler quiet */
}
- ereport(NOTICE,
+ ereport(DEBUG1,
(errmsg("%s %s will create implicit index \"%s\" for table \"%s\"",
is_alter_table ? "ALTER TABLE / ADD" : "CREATE TABLE /",
constraint_type,
@@ -379,7 +379,7 @@ transformColumnDefinition(CreateStmtContext *cxt, ColumnDef *column)
"seq",
snamespaceid);
- ereport(NOTICE,
+ ereport(DEBUG1,
(errmsg("%s will create implicit sequence \"%s\" for serial column \"%s.%s\"",
cxt->stmtType, sname,
cxt->relation->relname, column->colname)));
@@ -318,7 +318,6 @@ PL/Python function "sql_from_python_error"
CREATE TABLE specific (
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
$$
from plpy import spiexceptions
@@ -318,7 +318,6 @@ PL/Python function "sql_from_python_error"
CREATE TABLE specific (
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
$$
from plpy import spiexceptions
@@ -5,8 +5,6 @@ CREATE TABLE users (
userid serial,
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_fname_idx ON users(fname);
CREATE INDEX users_lname_idx ON users(lname);
@@ -15,26 +13,18 @@ CREATE TABLE taxonomy (
id serial primary key,
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 (
accession text not null primary key,
eid serial unique,
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 (
eid int4 not null references entry(eid),
pid serial primary key,
product text not null,
sequence text not null,
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 TABLE xsequences (
pid int4 not null references sequences(pid),
@@ -384,7 +384,6 @@ SELECT * FROM subtransaction_tbl;
TRUNCATE subtransaction_tbl;
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
AS $$
with plpy.subtransaction():
@@ -359,7 +359,6 @@ SELECT * FROM subtransaction_tbl;
TRUNCATE subtransaction_tbl;
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
AS $$
with plpy.subtransaction():
@@ -359,7 +359,6 @@ SELECT * FROM subtransaction_tbl;
TRUNCATE subtransaction_tbl;
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
AS $$
with plpy.subtransaction():
Oops, something went wrong.

0 comments on commit d7c7348

Please sign in to comment.