From 6eef5ee686f468dadd45a91e1a2de77fc348d56c Mon Sep 17 00:00:00 2001 From: Craig Ringer Date: Wed, 24 Jun 2015 13:22:46 +0800 Subject: [PATCH] Spelling in PRIMARY KEY error --- bdr_executor.c | 4 ++-- expected/dml/missing_pk.out | 48 ++++++++++++++++++------------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/bdr_executor.c b/bdr_executor.c index 494c9e556f..10012fc1ba 100644 --- a/bdr_executor.c +++ b/bdr_executor.c @@ -967,9 +967,9 @@ BdrExecutorStart(QueryDesc *queryDesc, int eflags) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("Cannot run UPDATE or DELETE on table %s because it does not have primary key.", + errmsg("Cannot run UPDATE or DELETE on table %s because it does not have a PRIMARY KEY.", RelationGetRelationName(rel)), - errhint("Add primary key to the table"))); + errhint("Add a PRIMARY KEY to the table"))); RelationClose(rel); } diff --git a/expected/dml/missing_pk.out b/expected/dml/missing_pk.out index 2d7d563886..831f82e859 100644 --- a/expected/dml/missing_pk.out +++ b/expected/dml/missing_pk.out @@ -47,53 +47,53 @@ SELECT * FROM bdr_missing_pk; -- these should fail \c :writedb2 UPDATE bdr_missing_pk SET a = 1; -ERROR: Cannot run UPDATE or DELETE on table bdr_missing_pk because it does not have primary key. -HINT: Add primary key to the table +ERROR: Cannot run UPDATE or DELETE on table bdr_missing_pk because it does not have a PRIMARY KEY. +HINT: Add a PRIMARY KEY to the table DELETE FROM bdr_missing_pk WHERE a = 1; -ERROR: Cannot run UPDATE or DELETE on table bdr_missing_pk because it does not have primary key. -HINT: Add primary key to the table +ERROR: Cannot run UPDATE or DELETE on table bdr_missing_pk because it does not have a PRIMARY KEY. +HINT: Add a PRIMARY KEY to the table UPDATE bdr_missing_pk_parent SET a = 1; -ERROR: Cannot run UPDATE or DELETE on table bdr_missing_pk because it does not have primary key. -HINT: Add primary key to the table +ERROR: Cannot run UPDATE or DELETE on table bdr_missing_pk because it does not have a PRIMARY KEY. +HINT: Add a PRIMARY KEY to the table DELETE FROM bdr_missing_pk_parent WHERE a = 1; -ERROR: Cannot run UPDATE or DELETE on table bdr_missing_pk because it does not have primary key. -HINT: Add primary key to the table +ERROR: Cannot run UPDATE or DELETE on table bdr_missing_pk because it does not have a PRIMARY KEY. +HINT: Add a PRIMARY KEY to the table WITH foo AS ( UPDATE bdr_missing_pk SET a = 1 WHERE a > 1 RETURNING a ) SELECT * FROM foo; -ERROR: Cannot run UPDATE or DELETE on table bdr_missing_pk because it does not have primary key. -HINT: Add primary key to the table +ERROR: Cannot run UPDATE or DELETE on table bdr_missing_pk because it does not have a PRIMARY KEY. +HINT: Add a PRIMARY KEY to the table WITH foo AS ( DELETE FROM bdr_missing_pk RETURNING a ) SELECT * FROM foo; -ERROR: Cannot run UPDATE or DELETE on table bdr_missing_pk because it does not have primary key. -HINT: Add primary key to the table +ERROR: Cannot run UPDATE or DELETE on table bdr_missing_pk because it does not have a PRIMARY KEY. +HINT: Add a PRIMARY KEY to the table UPDATE bdr_missing_pk_view SET a = 1; -ERROR: Cannot run UPDATE or DELETE on table bdr_missing_pk because it does not have primary key. -HINT: Add primary key to the table +ERROR: Cannot run UPDATE or DELETE on table bdr_missing_pk because it does not have a PRIMARY KEY. +HINT: Add a PRIMARY KEY to the table DELETE FROM bdr_missing_pk_view WHERE a = 1; -ERROR: Cannot run UPDATE or DELETE on table bdr_missing_pk because it does not have primary key. -HINT: Add primary key to the table +ERROR: Cannot run UPDATE or DELETE on table bdr_missing_pk because it does not have a PRIMARY KEY. +HINT: Add a PRIMARY KEY to the table WITH foo AS ( UPDATE bdr_missing_pk_view SET a = 1 WHERE a > 1 RETURNING a ) SELECT * FROM foo; -ERROR: Cannot run UPDATE or DELETE on table bdr_missing_pk because it does not have primary key. -HINT: Add primary key to the table +ERROR: Cannot run UPDATE or DELETE on table bdr_missing_pk because it does not have a PRIMARY KEY. +HINT: Add a PRIMARY KEY to the table WITH foo AS ( DELETE FROM bdr_missing_pk_view RETURNING a ) SELECT * FROM foo; -ERROR: Cannot run UPDATE or DELETE on table bdr_missing_pk because it does not have primary key. -HINT: Add primary key to the table +ERROR: Cannot run UPDATE or DELETE on table bdr_missing_pk because it does not have a PRIMARY KEY. +HINT: Add a PRIMARY KEY to the table WITH foo AS ( UPDATE bdr_missing_pk SET a = 1 RETURNING * ) INSERT INTO bdr_missing_pk SELECT * FROM foo; -ERROR: Cannot run UPDATE or DELETE on table bdr_missing_pk because it does not have primary key. -HINT: Add primary key to the table +ERROR: Cannot run UPDATE or DELETE on table bdr_missing_pk because it does not have a PRIMARY KEY. +HINT: Add a PRIMARY KEY to the table WITH foo AS ( DELETE FROM bdr_missing_pk_view RETURNING a ) INSERT INTO bdr_missing_pk SELECT * FROM foo; -ERROR: Cannot run UPDATE or DELETE on table bdr_missing_pk because it does not have primary key. -HINT: Add primary key to the table +ERROR: Cannot run UPDATE or DELETE on table bdr_missing_pk because it does not have a PRIMARY KEY. +HINT: Add a PRIMARY KEY to the table -- success again TRUNCATE bdr_missing_pk; SELECT pg_xlog_wait_remote_apply(pg_current_xlog_location(), 0); -- 2.39.5