[HACKERS] pltcl: sentence improvement
Hi, This simple patch improves a sentence. Spotted while working on translation. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento >From 7cae997155e222e0a8280018cccf717ab2ee1c38 Mon Sep 17 00:00:00 2001 From: Euler TaveiraDate: Wed, 16 Sep 2015 09:58:52 -0300 Subject: [PATCH] Improve sentence. Sentence is now consistent with a backend one. --- src/pl/tcl/pltcl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c index edfda59..3dcb31f 100644 --- a/src/pl/tcl/pltcl.c +++ b/src/pl/tcl/pltcl.c @@ -1055,7 +1055,7 @@ pltcl_trigger_handler(PG_FUNCTION_ARGS, bool pltrusted) if (ret_numvals % 2 != 0) ereport(ERROR, (errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED), - errmsg("invalid return list from trigger - must have even # of elements"))); + errmsg("invalid return list from trigger - must have even number of elements"))); modattrs = (int *) palloc(tupdesc->natts * sizeof(int)); modvalues = (Datum *) palloc(tupdesc->natts * sizeof(Datum)); -- 2.1.4 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] pltcl: sentence improvement
Euler Taveirawrites: > This simple patch improves a sentence. Spotted while working on translation. I concur that spelling out "#" as "number" is an improvement, but I'm curious which backend error you think this matches? Also, if we're going to change this message at all, I'm inclined to rewrite it completely, because it doesn't really follow the style guidelines. How about "trigger's return list must have even number of elements"? 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
Re: [HACKERS] pltcl: sentence improvement
On 16-09-2015 10:57, Tom Lane wrote: Euler Taveirawrites: This simple patch improves a sentence. Spotted while working on translation. I concur that spelling out "#" as "number" is an improvement, but I'm curious which backend error you think this matches? It is sort of... utils/adt/json.c 2088 ereport(ERROR, 2089 (errcode(ERRCODE_INVALID_PARAMETER_VALUE), 2090 errmsg("argument list must have even number of elements"), 2091 errhint("The arguments of json_build_object() must consist of alternating keys and values."))); replication/logical/logicalfuncs.c 361 ereport(ERROR, 362 (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), 363 errmsg("array must have even number of elements"))); Also, if we're going to change this message at all, I'm inclined to rewrite it completely, because it doesn't really follow the style guidelines. How about "trigger's return list must have even number of elements"? Works for me. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] pltcl: sentence improvement
Euler Taveirawrites: > On 16-09-2015 10:57, Tom Lane wrote: >> Also, if we're going to change this message at all, I'm inclined to >> rewrite it completely, because it doesn't really follow the style >> guidelines. How about "trigger's return list must have even number of >> elements"? > Works for me. Looking around, I noticed a couple of other error messages using "#" as an abbreviation. I changed those too. 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
Re: [HACKERS] pltcl: sentence improvement
Tom Lane wrote: > Also, if we're going to change this message at all, I'm inclined to > rewrite it completely, because it doesn't really follow the style > guidelines. How about "trigger's return list must have even number of > elements"? I agree a full rewrite is sensible, but that particular wording looks slightly odd to me. I would either have added an "an", or pluralized the subject, so either "trigger's return list must have an even number of elements" or "trigger's return lists must have even number of elements" However I notice that the "must have even number" wording (and others where "must have" is not followed by an indefinite article) is already used in other places, so maybe it's just an English quirk. -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] pltcl: sentence improvement
Alvaro Herrerawrites: > I agree a full rewrite is sensible, but that particular wording looks > slightly odd to me. I would either have added an "an", or pluralized > the subject, so either > "trigger's return list must have an even number of elements" > or > "trigger's return lists must have even number of elements" There's only one list involved, so the second doesn't seem right to me. I don't have a problem with adding "an", but as you say, we elide such articles elsewhere too. Feel free to change it if you like. 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