A few string fixed
Hello,
while translating the new PostgreSQL 9.3 strings I've found a couple
questionable. Patches attached.
Cheers,
-- Daniele
Attachments:
0001-Fixed-MultiXactIds-string-warning.patchapplication/octet-stream; name=0001-Fixed-MultiXactIds-string-warning.patchDownload
From 4a204f76eecb6261dc08f6677e278538ff8a9e6b Mon Sep 17 00:00:00 2001
From: Daniele Varrazzo <daniele.varrazzo@gmail.com>
Date: Wed, 20 Mar 2013 11:21:44 +0000
Subject: [PATCH 1/2] Fixed MultiXactIds string warning
There are two different pairs of strings to be translated:
"database \"%s\" must be vacuumed before %u more MultiXactId are used",
"database \"%s\" must be vacuumed before %u more MultiXactIds are used",
and:
"database with OID %u must be vacuumed before %u more MultiXactId are used",
"database with OID %u must be vacuumed before %u more MultiXactIds are used",
Dropped the singular versions, which seem an oversight.
---
src/backend/access/transam/multixact.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/access/transam/multixact.c b/src/backend/access/transam/multixact.c
index 9f804f7..69e8546 100644
--- a/src/backend/access/transam/multixact.c
+++ b/src/backend/access/transam/multixact.c
@@ -1980,14 +1980,14 @@ SetMultiXactIdLimit(MultiXactId oldest_datminmxid, Oid oldest_datoid)
if (oldest_datname)
ereport(WARNING,
- (errmsg("database \"%s\" must be vacuumed before %u more MultiXactId are used",
+ (errmsg("database \"%s\" must be vacuumed before %u more MultiXactIds are used",
oldest_datname,
multiWrapLimit - curMulti),
errhint("To avoid a database shutdown, execute a database-wide VACUUM in that database.\n"
"You might also need to commit or roll back old prepared transactions.")));
else
ereport(WARNING,
- (errmsg("database with OID %u must be vacuumed before %u more MultiXactId are used",
+ (errmsg("database with OID %u must be vacuumed before %u more MultiXactIds are used",
oldest_datoid,
multiWrapLimit - curMulti),
errhint("To avoid a database shutdown, execute a database-wide VACUUM in that database.\n"
--
1.7.9.5
0002-Fixed-pasto-in-hint-string-about-making-views-deleta.patchapplication/octet-stream; name=0002-Fixed-pasto-in-hint-string-about-making-views-deleta.patchDownload
From 01e12773bdf41bd7b606908bffd33f1b0a9e14d1 Mon Sep 17 00:00:00 2001
From: Daniele Varrazzo <daniele.varrazzo@gmail.com>
Date: Wed, 20 Mar 2013 11:24:45 +0000
Subject: [PATCH 2/2] Fixed pasto in hint string about making views deletable
---
src/backend/executor/execMain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c
index 1f2a23b..d2c8f19 100644
--- a/src/backend/executor/execMain.c
+++ b/src/backend/executor/execMain.c
@@ -1057,7 +1057,7 @@ CheckValidResultRel(Relation resultRel, CmdType operation)
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("cannot delete from view \"%s\"",
RelationGetRelationName(resultRel)),
- errhint("To make the view updatable, provide an unconditional ON DELETE DO INSTEAD rule or an INSTEAD OF DELETE trigger.")));
+ errhint("To make the view deletable, provide an unconditional ON DELETE DO INSTEAD rule or an INSTEAD OF DELETE trigger.")));
break;
default:
elog(ERROR, "unrecognized CmdType: %d", (int) operation);
--
1.7.9.5
Daniele Varrazzo <daniele.varrazzo@gmail.com> writes:
while translating the new PostgreSQL 9.3 strings I've found a couple
questionable. Patches attached.
Hmm ... I agree with the MultiXactId->MultiXactIds changes, but not with
this one:
- errhint("To make the view updatable, provide an unconditional ON DELETE DO INSTEAD rule or an INSTEAD OF DELETE trigger."))); + errhint("To make the view deletable, provide an unconditional ON DELETE DO INSTEAD rule or an INSTEAD OF DELETE trigger.")));
We use the phrase "updatable view", we don't say "deletable view"
(and this usage is also found in the SQL standard). We could possibly
make the message say "To make the view updatable in this way", or
"... for this purpose", but that seems a bit long-winded to me.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Wed, Mar 20, 2013 at 2:01 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Daniele Varrazzo <daniele.varrazzo@gmail.com> writes:
while translating the new PostgreSQL 9.3 strings I've found a couple
questionable. Patches attached.Hmm ... I agree with the MultiXactId->MultiXactIds changes, but not with
this one:- errhint("To make the view updatable, provide an unconditional ON DELETE DO INSTEAD rule or an INSTEAD OF DELETE trigger."))); + errhint("To make the view deletable, provide an unconditional ON DELETE DO INSTEAD rule or an INSTEAD OF DELETE trigger.")));We use the phrase "updatable view", we don't say "deletable view"
(and this usage is also found in the SQL standard). We could possibly
make the message say "To make the view updatable in this way", or
"... for this purpose", but that seems a bit long-winded to me.
Ok, I'd just thought it was a pasto.
-- Daniele
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers