Commit d7c73484 authored by Robert Haas's avatar Robert Haas

Reduce messages about implicit indexes and sequences to DEBUG1.

Per recent discussion on pgsql-hackers, these messages are too
chatty for most users.
parent 3e00d332
......@@ -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 <> 'â';
......
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
......
......@@ -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,17 +13,11 @@ 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,
......@@ -33,8 +25,6 @@ CREATE TABLE sequences (
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():
......
This diff is collapsed.
......@@ -980,7 +980,6 @@ select 33 = all ('{33,null,33}');
-- test indexes on arrays
create temp table arr_tbl (f1 int[] unique);
NOTICE: CREATE TABLE / UNIQUE will create implicit index "arr_tbl_f1_key" for table "arr_tbl"
insert into arr_tbl values ('{1,2,3}');
insert into arr_tbl values ('{1,2}');
-- failure expected:
......
......@@ -3,15 +3,11 @@
--
CREATE TABLE clstr_tst_s (rf_a SERIAL PRIMARY KEY,
b INT);
NOTICE: CREATE TABLE will create implicit sequence "clstr_tst_s_rf_a_seq" for serial column "clstr_tst_s.rf_a"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "clstr_tst_s_pkey" for table "clstr_tst_s"
CREATE TABLE clstr_tst (a SERIAL PRIMARY KEY,
b INT,
c TEXT,
d TEXT,
CONSTRAINT clstr_tst_con FOREIGN KEY (b) REFERENCES clstr_tst_s);
NOTICE: CREATE TABLE will create implicit sequence "clstr_tst_a_seq" for serial column "clstr_tst.a"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "clstr_tst_pkey" for table "clstr_tst"
CREATE INDEX clstr_tst_b ON clstr_tst (b);
CREATE INDEX clstr_tst_c ON clstr_tst (c);
CREATE INDEX clstr_tst_c_b ON clstr_tst (c,b);
......@@ -312,11 +308,8 @@ WHERE pg_class.oid=indexrelid
-- Verify that clustering all tables does in fact cluster the right ones
CREATE USER clstr_user;
CREATE TABLE clstr_1 (a INT PRIMARY KEY);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "clstr_1_pkey" for table "clstr_1"
CREATE TABLE clstr_2 (a INT PRIMARY KEY);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "clstr_2_pkey" for table "clstr_2"
CREATE TABLE clstr_3 (a INT PRIMARY KEY);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "clstr_3_pkey" for table "clstr_3"
ALTER TABLE clstr_1 OWNER TO clstr_user;
ALTER TABLE clstr_3 OWNER TO clstr_user;
GRANT SELECT ON clstr_2 TO clstr_user;
......@@ -386,7 +379,6 @@ SELECT * FROM clstr_1;
-- Test MVCC-safety of cluster. There isn't much we can do to verify the
-- results with a single backend...
CREATE TABLE clustertest (key int PRIMARY KEY);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "clustertest_pkey" for table "clustertest"
INSERT INTO clustertest VALUES (10);
INSERT INTO clustertest VALUES (20);
INSERT INTO clustertest VALUES (30);
......@@ -436,7 +428,6 @@ SELECT * FROM clustertest;
-- check that temp tables can be clustered
create temp table clstr_temp (col1 int primary key, col2 text);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "clstr_temp_pkey" for table "clstr_temp"
insert into clstr_temp values (2, 'two'), (1, 'one');
cluster clstr_temp using clstr_temp_pkey;
select * from clstr_temp;
......
......@@ -557,7 +557,6 @@ SET enable_seqscan TO 0;
SET enable_hashjoin TO 0;
SET enable_nestloop TO 0;
CREATE TABLE collate_test20 (f1 text COLLATE "C" PRIMARY KEY);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "collate_test20_pkey" for table "collate_test20"
INSERT INTO collate_test20 VALUES ('foo'), ('bar');
CREATE TABLE collate_test21 (f2 text COLLATE "POSIX" REFERENCES collate_test20);
INSERT INTO collate_test21 VALUES ('foo'), ('bar');
......
......@@ -5,7 +5,6 @@ CREATE TEMP TABLE x (
d text,
e text
) WITH OIDS;
NOTICE: CREATE TABLE will create implicit sequence "x_a_seq" for serial column "x.a"
CREATE FUNCTION fn_x_before () RETURNS TRIGGER AS '
BEGIN
NEW.e := ''before trigger fired''::text;
......
......@@ -2,14 +2,12 @@
-- Test cases for COPY (select) TO
--
create table test1 (id serial, t text);
NOTICE: CREATE TABLE will create implicit sequence "test1_id_seq" for serial column "test1.id"
insert into test1 (t) values ('a');
insert into test1 (t) values ('b');
insert into test1 (t) values ('c');
insert into test1 (t) values ('d');
insert into test1 (t) values ('e');
create table test2 (id serial, t text);
NOTICE: CREATE TABLE will create implicit sequence "test2_id_seq" for serial column "test2.id"
insert into test2 (t) values ('A');
insert into test2 (t) values ('B');
insert into test2 (t) values ('C');
......
......@@ -205,18 +205,13 @@ CREATE TABLE IF NOT EXISTS test_tsvector(
);
NOTICE: relation "test_tsvector" already exists, skipping
CREATE UNLOGGED TABLE unlogged1 (a int primary key); -- OK
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "unlogged1_pkey" for table "unlogged1"
INSERT INTO unlogged1 VALUES (42);
CREATE UNLOGGED TABLE public.unlogged2 (a int primary key); -- also OK
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "unlogged2_pkey" for table "unlogged2"
CREATE UNLOGGED TABLE pg_temp.unlogged3 (a int primary key); -- not OK
ERROR: only temporary relations may be created in temporary schemas
CREATE TABLE pg_temp.implicitly_temp (a int primary key); -- OK
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "implicitly_temp_pkey" for table "implicitly_temp"
CREATE TEMP TABLE explicitly_temp (a int primary key); -- also OK
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "explicitly_temp_pkey" for table "explicitly_temp"
CREATE TEMP TABLE pg_temp.doubly_temp (a int primary key); -- also OK
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "doubly_temp_pkey" for table "doubly_temp"
CREATE TEMP TABLE public.temp_to_perm (a int primary key); -- not OK
ERROR: cannot create temporary relation in non-temporary schema
DROP TABLE unlogged1, public.unlogged2;
......@@ -49,7 +49,6 @@ SELECT * FROM inhf; /* Single entry with value 'text' */
ALTER TABLE inhx add constraint foo CHECK (xx = 'text');
ALTER TABLE inhx ADD PRIMARY KEY (xx);
NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index "inhx_pkey" for table "inhx"
CREATE TABLE inhg (LIKE inhx); /* Doesn't copy constraint */
INSERT INTO inhg VALUES ('foo');
DROP TABLE inhg;
......@@ -68,7 +67,6 @@ SELECT * FROM inhg; /* Two records with three columns in order x=x, xx=text, y=y
DROP TABLE inhg;
CREATE TABLE inhg (x text, LIKE inhx INCLUDING INDEXES, y text); /* copies indexes */
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "inhg_pkey" for table "inhg"
INSERT INTO inhg VALUES (5, 10);
INSERT INTO inhg VALUES (20, 10); -- should fail
ERROR: duplicate key value violates unique constraint "inhg_pkey"
......@@ -78,12 +76,9 @@ DROP TABLE inhg;
CREATE TABLE inhg (x text, LIKE inhx INCLUDING INDEXES, PRIMARY KEY(x)); /* fails */
ERROR: multiple primary keys for table "inhg" are not allowed
CREATE TABLE inhz (xx text DEFAULT 'text', yy int UNIQUE);
NOTICE: CREATE TABLE / UNIQUE will create implicit index "inhz_yy_key" for table "inhz"
CREATE UNIQUE INDEX inhz_xx_idx on inhz (xx) WHERE xx <> 'test';
/* Ok to create multiple unique indexes */
CREATE TABLE inhg (x text UNIQUE, LIKE inhz INCLUDING INDEXES);
NOTICE: CREATE TABLE / UNIQUE will create implicit index "inhg_x_key" for table "inhg"
NOTICE: CREATE TABLE / UNIQUE will create implicit index "inhg_yy_key" for table "inhg"
INSERT INTO inhg (xx, yy, x) VALUES ('test', 5, 10);
INSERT INTO inhg (xx, yy, x) VALUES ('test', 10, 15);
INSERT INTO inhg (xx, yy, x) VALUES ('foo', 10, 15); -- should fail
......@@ -93,7 +88,6 @@ DROP TABLE inhg;
DROP TABLE inhz;
-- including storage and comments
CREATE TABLE ctlt1 (a text CHECK (length(a) > 2) PRIMARY KEY, b text);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "ctlt1_pkey" for table "ctlt1"
CREATE INDEX ctlt1_b_key ON ctlt1 (b);
CREATE INDEX ctlt1_fnidx ON ctlt1 ((a || b));
COMMENT ON COLUMN ctlt1.a IS 'A';
......@@ -192,7 +186,6 @@ SELECT description FROM pg_description, pg_constraint c WHERE classoid = 'pg_con
(1 row)
CREATE TABLE ctlt_all (LIKE ctlt1 INCLUDING ALL);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "ctlt_all_pkey" for table "ctlt_all"
\d+ ctlt_all
Table "public.ctlt_all"
Column | Type | Modifiers | Storage | Stats target | Description
......
......@@ -3,8 +3,6 @@ CREATE TABLE delete_test (
a INT,
b text
);
NOTICE: CREATE TABLE will create implicit sequence "delete_test_id_seq" for serial column "delete_test.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "delete_test_pkey" for table "delete_test"
INSERT INTO delete_test (a) VALUES (10);
INSERT INTO delete_test (a, b) VALUES (50, repeat('x', 10000));
INSERT INTO delete_test (a) VALUES (100);
......
......@@ -6,8 +6,6 @@ CREATE USER regression_user2;
CREATE USER regression_user3;
CREATE GROUP regression_group;
CREATE TABLE deptest (f1 serial primary key, f2 text);
NOTICE: CREATE TABLE will create implicit sequence "deptest_f1_seq" for serial column "deptest.f1"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "deptest_pkey" for table "deptest"
GRANT SELECT ON TABLE deptest TO GROUP regression_group;
GRANT ALL ON TABLE deptest TO regression_user, regression_user2;
-- can't drop neither because they have privileges somewhere
......@@ -59,12 +57,9 @@ ERROR: permission denied to reassign objects
-- this one is allowed
DROP OWNED BY regression_user0;
CREATE TABLE deptest1 (f1 int unique);
NOTICE: CREATE TABLE / UNIQUE will create implicit index "deptest1_f1_key" for table "deptest1"
GRANT ALL ON deptest1 TO regression_user1 WITH GRANT OPTION;
SET SESSION AUTHORIZATION regression_user1;
CREATE TABLE deptest (a serial primary key, b text);
NOTICE: CREATE TABLE will create implicit sequence "deptest_a_seq" for serial column "deptest.a"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "deptest_pkey" for table "deptest"
GRANT ALL ON deptest1 TO regression_user2;
RESET SESSION AUTHORIZATION;
\z deptest1
......@@ -91,8 +86,6 @@ DROP OWNED BY regression_user1;
GRANT ALL ON deptest1 TO regression_user1;
SET SESSION AUTHORIZATION regression_user1;
CREATE TABLE deptest (a serial primary key, b text);
NOTICE: CREATE TABLE will create implicit sequence "deptest_a_seq" for serial column "deptest.a"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "deptest_pkey" for table "deptest"
CREATE TABLE deptest2 (f1 int);
-- make a serial column the hard way
CREATE SEQUENCE ss1;
......
......@@ -263,7 +263,6 @@ create table defaulttest
, col7 ddef4 DEFAULT 8000
, col8 ddef5
);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "defaulttest_pkey" for table "defaulttest"
insert into defaulttest(col4) values(0); -- fails, col5 defaults to null
ERROR: null value in column "col5" violates not-null constraint
DETAIL: Failing row contains (3, 12, 5, 0, null, 88, 8000, 12.12).
......
......@@ -516,7 +516,6 @@ DROP FUNCTION echo_me(rainbow);
-- RI triggers on enum types
--
CREATE TABLE enumtest_parent (id rainbow PRIMARY KEY);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "enumtest_parent_pkey" for table "enumtest_parent"
CREATE TABLE enumtest_child (parent rainbow REFERENCES enumtest_parent);
INSERT INTO enumtest_parent VALUES ('red');
INSERT INTO enumtest_child VALUES ('red');
......
......@@ -665,7 +665,6 @@ LINE 1: CREATE FOREIGN TABLE ft1 ();
CREATE FOREIGN TABLE ft1 () SERVER no_server; -- ERROR
ERROR: server "no_server" does not exist
CREATE FOREIGN TABLE ft1 (c1 serial) SERVER sc; -- ERROR
NOTICE: CREATE FOREIGN TABLE will create implicit sequence "ft1_c1_seq" for serial column "ft1.c1"
ERROR: default values on foreign tables are not supported
CREATE FOREIGN TABLE ft1 () SERVER s0 WITH OIDS; -- ERROR
ERROR: syntax error at or near "WITH OIDS"
......
This diff is collapsed.
......@@ -6,16 +6,12 @@ CREATE TEMP TABLE articles (
body text UNIQUE,
created date
);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "articles_pkey" for table "articles"
NOTICE: CREATE TABLE / UNIQUE will create implicit index "articles_title_key" for table "articles"
NOTICE: CREATE TABLE / UNIQUE will create implicit index "articles_body_key" for table "articles"
CREATE TEMP TABLE articles_in_category (
article_id int,
category_id int,
changed date,
PRIMARY KEY (article_id, category_id)
);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "articles_in_category_pkey" for table "articles_in_category"
-- test functional dependencies based on primary keys/unique constraints
-- base tables
-- group by primary key (OK)
......@@ -119,7 +115,6 @@ ERROR: column "p.name" must appear in the GROUP BY clause or be used in an aggr
LINE 1: SELECT product_id, p.name, (sum(s.units) * p.price) AS sales
^
ALTER TABLE products ADD PRIMARY KEY (product_id);
NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index "products_pkey" for table "products"
-- OK now
SELECT product_id, p.name, (sum(s.units) * p.price) AS sales
FROM products p LEFT JOIN sales s USING (product_id)
......@@ -140,8 +135,6 @@ CREATE TEMP TABLE node (
-- snip
PRIMARY KEY (nid, vid)
);
NOTICE: CREATE TABLE will create implicit sequence "node_nid_seq" for serial column "node.nid"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "node_pkey" for table "node"
CREATE TEMP TABLE users (
uid integer NOT NULL default '0',
name varchar(60) NOT NULL default '',
......@@ -150,8 +143,6 @@ CREATE TEMP TABLE users (
PRIMARY KEY (uid),
UNIQUE (name)
);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "users_pkey" for table "users"
NOTICE: CREATE TABLE / UNIQUE will create implicit index "users_name_key" for table "users"
-- OK
SELECT u.uid, u.name FROM node n
INNER JOIN users u ON u.uid = n.uid
......
......@@ -536,7 +536,6 @@ SELECT relname, d.* FROM ONLY d, pg_class where d.tableoid = pg_class.oid;
-- Confirm PRIMARY KEY adds NOT NULL constraint to child table
CREATE TEMP TABLE z (b TEXT, PRIMARY KEY(aa, b)) inherits (a);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "z_pkey" for table "z"
INSERT INTO z VALUES (NULL, 'text'); -- should fail
ERROR: null value in column "aa" violates not-null constraint
DETAIL: Failing row contains (null, text).
......@@ -1044,17 +1043,12 @@ drop cascades to table patest2
-- Test merge-append plans for inheritance trees
--
create table matest0 (id serial primary key, name text);
NOTICE: CREATE TABLE will create implicit sequence "matest0_id_seq" for serial column "matest0.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "matest0_pkey" for table "matest0"
create table matest1 (id integer primary key) inherits (matest0);
NOTICE: merging column "id" with inherited definition
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "matest1_pkey" for table "matest1"
create table matest2 (id integer primary key) inherits (matest0);
NOTICE: merging column "id" with inherited definition
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "matest2_pkey" for table "matest2"
create table matest3 (id integer primary key) inherits (matest0);
NOTICE: merging column "id" with inherited definition
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "matest3_pkey" for table "matest3"
create index matest0i on matest0 ((1-id));
create index matest1i on matest1 ((1-id));
-- create index matest2i on matest2 ((1-id)); -- intentionally missing
......
......@@ -2323,11 +2323,8 @@ from yy
-- (as seen in early 8.2.x releases)
--
create temp table zt1 (f1 int primary key);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "zt1_pkey" for table "zt1"
create temp table zt2 (f2 int primary key);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "zt2_pkey" for table "zt2"
create temp table zt3 (f3 int primary key);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "zt3_pkey" for table "zt3"
insert into zt1 values(53);
insert into zt2 values(53);
select * from
......@@ -2452,19 +2449,16 @@ create temp table a (
code char not null,
constraint a_pk primary key (code)
);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "a_pk" for table "a"
create temp table b (
a char not null,
num integer not null,
constraint b_pk primary key (a, num)
);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "b_pk" for table "b"
create temp table c (
name char not null,
a char,
constraint c_pk primary key (name)
);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "c_pk" for table "c"
insert into a (code) values ('p');
insert into a (code) values ('q');
insert into b (a, num) values ('p', 1);
......@@ -2831,11 +2825,8 @@ select b.unique1 from
--
begin;
CREATE TEMP TABLE a (id int PRIMARY KEY, b_id int);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "a_pkey" for table "a"
CREATE TEMP TABLE b (id int PRIMARY KEY, c_id int);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "b_pkey" for table "b"
CREATE TEMP TABLE c (id int PRIMARY KEY);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "c_pkey" for table "c"
INSERT INTO a VALUES (0, 0), (1, NULL);
INSERT INTO b VALUES (0, 0), (1, NULL);
INSERT INTO c VALUES (0), (1);
......@@ -2876,9 +2867,7 @@ select id from a where id in (
rollback;
create temp table parent (k int primary key, pd int);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "parent_pkey" for table "parent"
create temp table child (k int unique, cd int);
NOTICE: CREATE TABLE / UNIQUE will create implicit index "child_k_key" for table "child"
insert into parent values (1, 10), (2, 20), (3, 30);
insert into child values (1, 100), (4, 400);
-- this case is optimizable
......@@ -2961,9 +2950,7 @@ select p.* from
-- bug 5255: this is not optimizable by join removal
begin;
CREATE TEMP TABLE a (id int PRIMARY KEY);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "a_pkey" for table "a"
CREATE TEMP TABLE b (id int PRIMARY KEY, a_id int);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "b_pkey" for table "b"
INSERT INTO a VALUES (0), (1);
INSERT INTO b VALUES (0, 0), (1, NULL);
SELECT * FROM b LEFT JOIN a ON (b.a_id = a.id) WHERE (a.id IS NULL OR a.id > 0);
......@@ -2982,7 +2969,6 @@ rollback;
-- another join removal bug: this is not optimizable, either
begin;
create temp table innertab (id int8 primary key, dat1 int8);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "innertab_pkey" for table "innertab"
insert into innertab values(123, 42);
SELECT * FROM
(SELECT 1 AS x) ss1
......
......@@ -9,8 +9,6 @@ CREATE SCHEMA test_schema_1
a serial,
b int UNIQUE
);
NOTICE: CREATE TABLE will create implicit sequence "abc_a_seq" for serial column "abc.a"
NOTICE: CREATE TABLE / UNIQUE will create implicit index "abc_b_key" for table "abc"
-- verify that the objects were created
SELECT COUNT(*) FROM pg_class WHERE relnamespace =
(SELECT oid FROM pg_namespace WHERE nspname = 'test_schema_1');
......
......@@ -2083,7 +2083,6 @@ PL/pgSQL function test_variable_storage() line 8 at PERFORM
-- test foreign key error trapping
--
create temp table master(f1 int primary key);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "master_pkey" for table "master"
create temp table slave(f1 int references master deferrable);
insert into master values(1);
insert into slave values(1);
......@@ -2154,7 +2153,6 @@ drop function trap_foreign_key_2();
-- Test proper snapshot handling in simple expressions
--
create temp table users(login text, id serial);
NOTICE: CREATE TABLE will create implicit sequence "users_id_seq" for serial column "users.id"
create function sp_id_user(a_login text) returns int as $$
declare x int;
begin
......@@ -2669,7 +2667,6 @@ NOTICE: {10,20,30}; 20; xyz; xyzabc; (10,aaa,,30); <NULL>
drop function raise_exprs();
-- continue statement
create table conttesttbl(idx serial, v integer);
NOTICE: CREATE TABLE will create implicit sequence "conttesttbl_idx_seq" for serial column "conttesttbl.idx"
insert into conttesttbl(v) values(10);
insert into conttesttbl(v) values(20);
insert into conttesttbl(v) values(30);
......
......@@ -58,7 +58,6 @@ select foot.fooid, foot.f2 from foot(sin(pi()/2)::int) ORDER BY 1,2;
(2 rows)
CREATE TABLE foo (fooid int, foosubid int, fooname text, primary key(fooid,foosubid));
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "foo_pkey" for table "foo"
INSERT INTO foo VALUES(1,1,'Joe');
INSERT INTO foo VALUES(1,2,'Ed');
INSERT INTO foo VALUES(2,1,'Mary');
......@@ -230,7 +229,6 @@ DROP TABLE foo2;
DROP TABLE foo;
-- Rescan tests --
CREATE TABLE foorescan (fooid int, foosubid int, fooname text, primary key(fooid,foosubid));
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "foorescan_pkey" for table "foorescan"
INSERT INTO foorescan values(5000,1,'abc.5000.1');
INSERT INTO foorescan values(5001,1,'abc.5001.1');
INSERT INTO foorescan values(5002,1,'abc.5002.1');
......@@ -316,7 +314,6 @@ SELECT * FROM foorescan f WHERE f.fooid IN (SELECT fooid FROM vw_foorescan) ORDE
(10 rows)
CREATE TABLE barrescan (fooid int primary key);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "barrescan_pkey" for table "barrescan"
INSERT INTO barrescan values(5003);
INSERT INTO barrescan values(5004);
INSERT INTO barrescan values(5005);
......@@ -579,7 +576,6 @@ DROP FUNCTION foo(int);
-- some tests on SQL functions with RETURNING
--
create temp table tt(f1 serial, data text);
NOTICE: CREATE TABLE will create implicit sequence "tt_f1_seq" for serial column "tt.f1"
create function insert_tt(text) returns int as
$$ insert into tt(data) values($1) returning f1 $$
language sql;
......
......@@ -836,8 +836,6 @@ create table test_range_excl(
exclude using gist (room with =, during with &&),
exclude using gist (speaker with =, during with &&)
);
NOTICE: CREATE TABLE / EXCLUDE will create implicit index "test_range_excl_room_during_excl" for table "test_range_excl"
NOTICE: CREATE TABLE / EXCLUDE will create implicit index "test_range_excl_speaker_during_excl" for table "test_range_excl"
insert into test_range_excl
values(int4range(123, 123, '[]'), int4range(1, 1, '[]'), '[2010-01-02 10:00, 2010-01-02 11:00)');
insert into test_range_excl
......
......@@ -3,7 +3,6 @@
--
-- Simple cases
CREATE TEMP TABLE foo (f1 serial, f2 text, f3 int default 42);
NOTICE: CREATE TABLE will create implicit sequence "foo_f1_seq" for serial column "foo.f1"
INSERT INTO foo (f2,f3)
VALUES ('test', DEFAULT), ('More', 11), (upper('more'), 7+9)
RETURNING *, f1+f3 AS sum;
......
......@@ -305,8 +305,6 @@ CREATE TABLE price (
active BOOLEAN NOT NULL,
price NUMERIC
);
NOTICE: CREATE TABLE will create implicit sequence "price_id_seq" for serial column "price.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "price_pkey" for table "price"
CREATE TYPE price_input AS (
id INTEGER,
price NUMERIC
......
......@@ -1400,13 +1400,11 @@ create table rule_and_refint_t1 (
id1b integer,
primary key (id1a, id1b)
);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "rule_and_refint_t1_pkey" for table "rule_and_refint_t1"
create table rule_and_refint_t2 (
id2a integer,
id2c integer,
primary key (id2a, id2c)
);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "rule_and_refint_t2_pkey" for table "rule_and_refint_t2"
create table rule_and_refint_t3 (
id3a integer,
id3b integer,
......@@ -1416,7 +1414,6 @@ create table rule_and_refint_t3 (
foreign key (id3a, id3b) references rule_and_refint_t1 (id1a, id1b),
foreign key (id3a, id3c) references rule_and_refint_t2 (id2a, id2c)
);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "rule_and_refint_t3_pkey" for table "rule_and_refint_t3"
insert into rule_and_refint_t1 values (1, 11);
insert into rule_and_refint_t1 values (1, 12);
insert into rule_and_refint_t1 values (2, 21);
......@@ -1462,18 +1459,13 @@ drop view fooview;
-- check for planner problems with complex inherited UPDATES
--
create table id (id serial primary key, name text);
NOTICE: CREATE TABLE will create implicit sequence "id_id_seq" for serial column "id.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "id_pkey" for table "id"
-- currently, must respecify PKEY for each inherited subtable
create table test_1 (id integer primary key) inherits (id);
NOTICE: merging column "id" with inherited definition
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "test_1_pkey" for table "test_1"
create table test_2 (id integer primary key) inherits (id);
NOTICE: merging column "id" with inherited definition
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "test_2_pkey" for table "test_2"
create table test_3 (id integer primary key) inherits (id);
NOTICE: merging column "id" with inherited definition
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "test_3_pkey" for table "test_3"
insert into test_1 (name) values ('Test 1');
insert into test_1 (name) values ('Test 2');
insert into test_2 (name) values ('Test 3');
......@@ -1516,7 +1508,6 @@ reset client_min_messages;
-- constraint exclusion
--
create temp table t1 (a integer primary key);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "t1_pkey" for table "t1"
create temp table t1_1 (check (a >= 0 and a < 10)) inherits (t1);
create temp table t1_2 (check (a >= 10 and a < 20)) inherits (t1);
create rule t1_ins_1 as on insert to t1
......
......@@ -1260,7 +1260,6 @@ CREATE TABLE customer (
tel text,
passwd text
);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "customer_pkey" for table "customer"
CREATE TABLE credit_card (
cid int references customer(cid),
cnum text,
......
......@@ -1260,7 +1260,6 @@ CREATE TABLE customer (
tel text,
passwd text
);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "customer_pkey" for table "customer"
CREATE TABLE credit_card (
cid int references customer(cid),
cnum text,
......
......@@ -2,7 +2,6 @@
--- test creation of SERIAL column
---
CREATE TABLE serialTest (f1 text, f2 serial);
NOTICE: CREATE TABLE will create implicit sequence "serialtest_f2_seq" for serial column "serialtest.f2"
INSERT INTO serialTest VALUES ('foo');
INSERT INTO serialTest VALUES ('bar');
INSERT INTO serialTest VALUES ('force', 100);
......@@ -20,11 +19,6 @@ SELECT * FROM serialTest;
-- test smallserial / bigserial
CREATE TABLE serialTest2 (f1 text, f2 serial, f3 smallserial, f4 serial2,
f5 bigserial, f6 serial8);
NOTICE: CREATE TABLE will create implicit sequence "serialtest2_f2_seq" for serial column "serialtest2.f2"
NOTICE: CREATE TABLE will create implicit sequence "serialtest2_f3_seq" for serial column "serialtest2.f3"
NOTICE: CREATE TABLE will create implicit sequence "serialtest2_f4_seq" for serial column "serialtest2.f4"
NOTICE: CREATE TABLE will create implicit sequence "serialtest2_f5_seq" for serial column "serialtest2.f5"
NOTICE: CREATE TABLE will create implicit sequence "serialtest2_f6_seq" for serial column "serialtest2.f6"
INSERT INTO serialTest2 (f1)
VALUES ('test_defaults');
INSERT INTO serialTest2 (f1, f2, f3, f4, f5, f6)
......@@ -220,7 +214,6 @@ CREATE TEMP TABLE t1 (
f2 int DEFAULT nextval('myseq2'),
f3 int DEFAULT nextval('myseq3'::text)
);
NOTICE: CREATE TABLE will create implicit sequence "t1_f1_seq" for serial column "t1.f1"
-- Both drops should fail, but with different error messages:
DROP SEQUENCE t1_f1_seq;
ERROR: cannot drop sequence t1_f1_seq because other objects depend on it
......
......@@ -2,7 +2,6 @@
--- test creation of SERIAL column
---
CREATE TABLE serialTest (f1 text, f2 serial);
NOTICE: CREATE TABLE will create implicit sequence "serialtest_f2_seq" for serial column "serialtest.f2"
INSERT INTO serialTest VALUES ('foo');
INSERT INTO serialTest VALUES ('bar');
INSERT INTO serialTest VALUES ('force', 100);
......@@ -20,11 +19,6 @@ SELECT * FROM serialTest;
-- test smallserial / bigserial
CREATE TABLE serialTest2 (f1 text, f2 serial, f3 smallserial, f4 serial2,
f5 bigserial, f6 serial8);
NOTICE: CREATE TABLE will create implicit sequence "serialtest2_f2_seq" for serial column "serialtest2.f2"
NOTICE: CREATE TABLE will create implicit sequence "serialtest2_f3_seq" for serial column "serialtest2.f3"
NOTICE: CREATE TABLE will create implicit sequence "serialtest2_f4_seq" for serial column "serialtest2.f4"
NOTICE: CREATE TABLE will create implicit sequence "serialtest2_f5_seq" for serial column "serialtest2.f5"
NOTICE: CREATE TABLE will create implicit sequence "serialtest2_f6_seq" for serial column "serialtest2.f6"
INSERT INTO serialTest2 (f1)
VALUES ('test_defaults');
INSERT INTO serialTest2 (f1, f2, f3, f4, f5, f6)
......@@ -220,7 +214,6 @@ CREATE TEMP TABLE t1 (
f2 int DEFAULT nextval('myseq2'),
f3 int DEFAULT nextval('myseq3'::text)
);
NOTICE: CREATE TABLE will create implicit sequence "t1_f1_seq" for serial column "t1.f1"
-- Both drops should fail, but with different error messages:
DROP SEQUENCE t1_f1_seq;
ERROR: cannot drop sequence t1_f1_seq because other objects depend on it
......
......@@ -442,17 +442,14 @@ select * from numeric_table
-- Test case for bug #4290: bogus calculation of subplan param sets
--
create temp table ta (id int primary key, val int);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "ta_pkey" for table "ta"
insert into ta values(1,1);
insert into ta values(2,2);
create temp table tb (id int primary key, aval int);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "tb_pkey" for table "tb"
insert into tb values(1,1);
insert into tb values(2,1);
insert into tb values(3,2);
insert into tb values(4,2);
create temp table tc (id int primary key, aid int);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "tc_pkey" for table "tc"
insert into tc values(1,1);
insert into tc values(2,2);
select
......
......@@ -119,7 +119,6 @@ ERROR: ON COMMIT can only be used on temporary tables
-- Test foreign keys
BEGIN;
CREATE TEMP TABLE temptest1(col int PRIMARY KEY);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "temptest1_pkey" for table "temptest1"
CREATE TEMP TABLE temptest2(col int REFERENCES temptest1)
ON COMMIT DELETE ROWS;
INSERT INTO temptest1 VALUES (1);
......@@ -138,7 +137,6 @@ SELECT * FROM temptest2;
BEGIN;
CREATE TEMP TABLE temptest3(col int PRIMARY KEY) ON COMMIT DELETE ROWS;
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "temptest3_pkey" for table "temptest3"
CREATE TEMP TABLE temptest4(col int REFERENCES temptest3);
COMMIT;
ERROR: unsupported ON COMMIT and foreign key combination
......
......@@ -538,14 +538,12 @@ rollback;
BEGIN;
savepoint x;
CREATE TABLE koju (a INT UNIQUE);
NOTICE: CREATE TABLE / UNIQUE will create implicit index "koju_a_key" for table "koju"
INSERT INTO koju VALUES (1);
INSERT INTO koju VALUES (1);
ERROR: duplicate key value violates unique constraint "koju_a_key"
DETAIL: Key (a)=(1) already exists.
rollback to x;
CREATE TABLE koju (a INT UNIQUE);
NOTICE: CREATE TABLE / UNIQUE will create implicit index "koju_a_key" for table "koju"
INSERT INTO koju VALUES (1);
INSERT INTO koju VALUES (1);
ERROR: duplicate key value violates unique constraint "koju_a_key"
......
......@@ -529,8 +529,6 @@ ALTER TABLE main_table DROP COLUMN b;
rollback;
-- Test enable/disable triggers
create table trigtest (i serial primary key);
NOTICE: CREATE TABLE will create implicit sequence "trigtest_i_seq" for serial column "trigtest.i"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "trigtest_pkey" for table "trigtest"
-- test that disabling RI triggers works
create table trigtest2 (i int references trigtest(i) on delete cascade);
create function trigtest() returns trigger as $$
......@@ -1155,9 +1153,6 @@ CREATE TABLE country_table (
country_name text unique not null,
continent text not null
);
NOTICE: CREATE TABLE will create implicit sequence "country_table_country_id_seq" for serial column "country_table.country_id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "country_table_pkey" for table "country_table"
NOTICE: CREATE TABLE / UNIQUE will create implicit index "country_table_country_name_key" for table "country_table"
INSERT INTO country_table (country_name, continent)
VALUES ('Japan', 'Asia'),
('UK', 'Europe'),
......@@ -1176,8 +1171,6 @@ CREATE TABLE city_table (
population bigint,
country_id int references country_table
);
NOTICE: CREATE TABLE will create implicit sequence "city_table_city_id_seq" for serial column "city_table.city_id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "city_table_pkey" for table "city_table"
CREATE VIEW city_view AS
SELECT city_id, city_name, population, country_name, continent
FROM city_table ci
......@@ -1445,11 +1438,8 @@ drop cascades to view european_city_view
DROP TABLE country_table;
-- Test pg_trigger_depth()
create table depth_a (id int not null primary key);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "depth_a_pkey" for table "depth_a"
create table depth_b (id int not null primary key);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "depth_b_pkey" for table "depth_b"
create table depth_c (id int not null primary key);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "depth_c_pkey" for table "depth_c"
create function depth_a_tf() returns trigger
language plpgsql as $$
begin
......
-- Test basic TRUNCATE functionality.
CREATE TABLE truncate_a (col1 integer primary key);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "truncate_a_pkey" for table "truncate_a"
INSERT INTO truncate_a VALUES (1);
INSERT INTO truncate_a VALUES (2);
SELECT * FROM truncate_a;
......@@ -33,8 +32,6 @@ SELECT * FROM truncate_a;
-- Test foreign-key checks
CREATE TABLE trunc_b (a int REFERENCES truncate_a);
CREATE TABLE trunc_c (a serial PRIMARY KEY);
NOTICE: CREATE TABLE will create implicit sequence "trunc_c_a_seq" for serial column "trunc_c.a"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "trunc_c_pkey" for table "trunc_c"
CREATE TABLE trunc_d (a int REFERENCES trunc_c);
CREATE TABLE trunc_e (a int REFERENCES truncate_a, b int REFERENCES trunc_c);
TRUNCATE TABLE truncate_a; -- fail
......@@ -143,7 +140,6 @@ SELECT * FROM trunc_e;
DROP TABLE truncate_a,trunc_c,trunc_b,trunc_d,trunc_e CASCADE;
-- Test TRUNCATE with inheritance
CREATE TABLE trunc_f (col1 integer primary key);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "trunc_f_pkey" for table "trunc_f"
INSERT INTO trunc_f VALUES (1);
INSERT INTO trunc_f VALUES (2);
CREATE TABLE trunc_fa (col2a text) INHERITS (trunc_f);
......@@ -367,7 +363,6 @@ DROP FUNCTION trunctrigger();
CREATE SEQUENCE truncate_a_id1 START WITH 33;
CREATE TABLE truncate_a (id serial,
id1 integer default nextval('truncate_a_id1'));
NOTICE: CREATE TABLE will create implicit sequence "truncate_a_id_seq" for serial column "truncate_a.id"
ALTER SEQUENCE truncate_a_id1 OWNED BY truncate_a.id1;
INSERT INTO truncate_a DEFAULT VALUES;
INSERT INTO truncate_a DEFAULT VALUES;
......
......@@ -45,8 +45,6 @@ CREATE TABLE persons2 OF person_type (
id WITH OPTIONS PRIMARY KEY,
UNIQUE (name)
);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "persons2_pkey" for table "persons2"
NOTICE: CREATE TABLE / UNIQUE will create implicit index "persons2_name_key" for table "persons2"
\d persons2
Table "public.persons2"
Column | Type | Modifiers
......@@ -62,7 +60,6 @@ CREATE TABLE persons3 OF person_type (
PRIMARY KEY (id),
name WITH OPTIONS DEFAULT ''
);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "persons3_pkey" for table "persons3"
\d persons3
Table "public.persons3"
Column | Type | Modifiers
......
......@@ -462,7 +462,6 @@ LINE 1: SELECT '3.4'::numeric UNION SELECT 'foo';
CREATE TEMP TABLE t1 (a text, b text);
CREATE INDEX t1_ab_idx on t1 ((a || b));
CREATE TEMP TABLE t2 (ab text primary key);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "t2_pkey" for table "t2"
INSERT INTO t1 VALUES ('a', 'b'), ('x', 'y');
INSERT INTO t2 VALUES ('ab'), ('xy');
set enable_seqscan = off;
......
......@@ -59,7 +59,6 @@ SELECT * FROM vactst;
VACUUM (FULL, FREEZE) vactst;
VACUUM (ANALYZE, FULL) vactst;
CREATE TABLE vaccluster (i INT PRIMARY KEY);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "vaccluster_pkey" for table "vaccluster"
ALTER TABLE vaccluster CLUSTER ON vaccluster_pkey;
INSERT INTO vaccluster SELECT * FROM vactst;
CLUSTER vaccluster;
......
......@@ -139,7 +139,6 @@ CREATE TEMP TABLE department (
parent_department INTEGER REFERENCES department, -- upper department ID
name TEXT -- department name
);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "department_pkey" for table "department"
INSERT INTO department VALUES (0, NULL, 'ROOT');
INSERT INTO department VALUES (1, 0, 'A');
INSERT INTO department VALUES (2, 1, 'B');
......@@ -398,7 +397,6 @@ CREATE TEMPORARY TABLE tree(
id INTEGER PRIMARY KEY,
parent_id INTEGER REFERENCES tree(id)
);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "tree_pkey" for table "tree"
INSERT INTO tree
VALUES (1, NULL), (2, 1), (3,1), (4,2), (5,2), (6,2), (7,3), (8,3),
(9,4), (10,4), (11,7), (12,7), (13,7), (14, 9), (15,11), (16,11);
......
......@@ -343,7 +343,6 @@ SELECT * FROM COPY_TBL;
-- Primary keys
--
CREATE TABLE PRIMARY_TBL (i int PRIMARY KEY, t text);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "primary_tbl_pkey" for table "primary_tbl"
INSERT INTO PRIMARY_TBL VALUES (1, 'one');
INSERT INTO PRIMARY_TBL VALUES (2, 'two');
INSERT INTO PRIMARY_TBL VALUES (1, 'three');
......@@ -366,7 +365,6 @@ SELECT '' AS four, * FROM PRIMARY_TBL;
DROP TABLE PRIMARY_TBL;
CREATE TABLE PRIMARY_TBL (i int, t text,
PRIMARY KEY(i,t));
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "primary_tbl_pkey" for table "primary_tbl"
INSERT INTO PRIMARY_TBL VALUES (1, 'one');
INSERT INTO PRIMARY_TBL VALUES (2, 'two');
INSERT INTO PRIMARY_TBL VALUES (1, 'three');
......@@ -390,7 +388,6 @@ DROP TABLE PRIMARY_TBL;
-- Unique keys
--
CREATE TABLE UNIQUE_TBL (i int UNIQUE, t text);
NOTICE: CREATE TABLE / UNIQUE will create implicit index "unique_tbl_i_key" for table "unique_tbl"
INSERT INTO UNIQUE_TBL VALUES (1, 'one');
INSERT INTO UNIQUE_TBL VALUES (2, 'two');
INSERT INTO UNIQUE_TBL VALUES (1, 'three');
......@@ -414,7 +411,6 @@ SELECT '' AS five, * FROM UNIQUE_TBL;
DROP TABLE UNIQUE_TBL;
CREATE TABLE UNIQUE_TBL (i int, t text,
UNIQUE(i,t));
NOTICE: CREATE TABLE / UNIQUE will create implicit index "unique_tbl_i_t_key" for table "unique_tbl"
INSERT INTO UNIQUE_TBL VALUES (1, 'one');
INSERT INTO UNIQUE_TBL VALUES (2, 'two');
INSERT INTO UNIQUE_TBL VALUES (1, 'three');
......@@ -438,7 +434,6 @@ DROP TABLE UNIQUE_TBL;
-- Deferrable unique constraints
--
CREATE TABLE unique_tbl (i int UNIQUE DEFERRABLE, t text);
NOTICE: CREATE TABLE / UNIQUE will create implicit index "unique_tbl_i_key" for table "unique_tbl"
INSERT INTO unique_tbl VALUES (0, 'one');
INSERT INTO unique_tbl VALUES (1, 'two');
INSERT INTO unique_tbl VALUES (2, 'tree');
......@@ -482,7 +477,6 @@ SELECT * FROM unique_tbl;
ALTER TABLE unique_tbl DROP CONSTRAINT unique_tbl_i_key;
ALTER TABLE unique_tbl ADD CONSTRAINT unique_tbl_i_key
UNIQUE (i) DEFERRABLE INITIALLY DEFERRED;
NOTICE: ALTER TABLE / ADD UNIQUE will create implicit index "unique_tbl_i_key" for table "unique_tbl"
BEGIN;
INSERT INTO unique_tbl VALUES (1, 'five');
INSERT INTO unique_tbl VALUES (5, 'one');
......@@ -578,7 +572,6 @@ CREATE TABLE circles (
(c1 WITH &&, (c2::circle) WITH &&)
WHERE (circle_center(c1) <> '(0,0)')
);
NOTICE: CREATE TABLE / EXCLUDE will create implicit index "circles_c1_c2_excl" for table "circles"
-- these should succeed because they don't match the index predicate
INSERT INTO circles VALUES('<(0,0), 5>', '<(0,0), 5>');
INSERT INTO circles VALUES('<(0,0), 5>', '<(0,0), 4>');
......@@ -595,7 +588,6 @@ INSERT INTO circles VALUES('<(20,20), 10>', '<(10,10), 5>');
-- should fail on existing data without the WHERE clause
ALTER TABLE circles ADD EXCLUDE USING gist
(c1 WITH &&, (c2::circle) WITH &&);
NOTICE: ALTER TABLE / ADD EXCLUDE will create implicit index "circles_c1_c2_excl1" for table "circles"
ERROR: could not create exclusion constraint "circles_c1_c2_excl1"
DETAIL: Key (c1, (c2::circle))=(<(0,0),5>, <(0,0),5>) conflicts with key (c1, (c2::circle))=(<(0,0),5>, <(0,0),4>).
-- try reindexing an existing constraint
......@@ -606,7 +598,6 @@ CREATE TABLE deferred_excl (
f1 int,
CONSTRAINT deferred_excl_con EXCLUDE (f1 WITH =) INITIALLY DEFERRED
);
NOTICE: CREATE TABLE / EXCLUDE will create implicit index "deferred_excl_con" for table "deferred_excl"
INSERT INTO deferred_excl VALUES(1);
INSERT INTO deferred_excl VALUES(2);
INSERT INTO deferred_excl VALUES(1); -- fail
......@@ -627,7 +618,6 @@ ALTER TABLE deferred_excl DROP CONSTRAINT deferred_excl_con;
-- This should fail, but worth testing because of HOT updates
UPDATE deferred_excl SET f1 = 3;
ALTER TABLE deferred_excl ADD EXCLUDE (f1 WITH =);
NOTICE: ALTER TABLE / ADD EXCLUDE will create implicit index "deferred_excl_f1_excl" for table "deferred_excl"
ERROR: could not create exclusion constraint "deferred_excl_f1_excl"
DETAIL: Key (f1)=(3) conflicts with key (f1)=(3).
DROP TABLE deferred_excl;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment