pg_stat_monitor/regression/expected/error_insert_1.out

36 lines
1.7 KiB
Plaintext

Drop Table if exists Company;
NOTICE: table "company" does not exist, skipping
CREATE TABLE Company(
ID INT PRIMARY KEY NOT NULL,
NAME TEXT NOT NULL
);
CREATE EXTENSION pg_stat_monitor;
SELECT pg_stat_monitor_reset();
pg_stat_monitor_reset
-----------------------
(1 row)
INSERT INTO Company(ID, Name) VALUES (1, 'Percona');
INSERT INTO Company(ID, Name) VALUES (1, 'Percona');
ERROR: duplicate key value violates unique constraint "company_pkey"
DETAIL: Key (id)=(1) already exists.
Drop Table if exists Company;
SELECT query, elevel, sqlcode, message FROM pg_stat_monitor ORDER BY query COLLATE "C",elevel;
query | elevel | sqlcode | message
-----------------------------------------------------------------------------------------------+--------+---------+---------------------------------------------------------------
Drop Table if exists Company | 0 | |
INSERT INTO Company(ID, Name) VALUES (1, 'Percona') | 0 | |
INSERT INTO Company(ID, Name) VALUES (1, 'Percona'); | 20 | 23505 | duplicate key value violates unique constraint "company_pkey"
SELECT pg_stat_monitor_reset() | 0 | |
SELECT query, elevel, sqlcode, message FROM pg_stat_monitor ORDER BY query COLLATE "C",elevel | 0 | |
(5 rows)
SELECT pg_stat_monitor_reset();
pg_stat_monitor_reset
-----------------------
(1 row)
DROP EXTENSION pg_stat_monitor;