aboutsummaryrefslogtreecommitdiff
path: root/src/backend/rewrite/rewriteHandler.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2018-08-21 15:17:13 +0900
committerMichael Paquier <michael@paquier.xyz>2018-08-21 15:17:13 +0900
commit72be8c29a18812975fcc8765a122faf0e4d0c755 (patch)
tree52559dac01077e01cf8979aaef03e97e9043814d /src/backend/rewrite/rewriteHandler.c
parentd8c83800c3ed2f0d677eb6620a9e9dc7b81a678b (diff)
downloadpostgresql-72be8c29a18812975fcc8765a122faf0e4d0c755.tar.gz
postgresql-72be8c29a18812975fcc8765a122faf0e4d0c755.zip
Fix set of NLS translation issues
While monitoring the code, a couple of issues related to string translation has showed up: - Some routines for auto-updatable views return an error string, which sometimes missed the shot. A comment regarding string translation is added for each routine to help with future features. - GSSAPI authentication missed two translations. - vacuumdb handles non-translated strings. - GetConfigOptionByNum should translate strings. This part is not back-patched as after a minor upgrade this could be surprising for users. Reported-by: Kyotaro Horiguchi Author: Kyotaro Horiguchi Reviewed-by: Michael Paquier, Tom Lane Discussion: https://postgr.es/m/20180810.152131.31921918.horiguchi.kyotaro@lab.ntt.co.jp Backpatch-through: 9.3
Diffstat (limited to 'src/backend/rewrite/rewriteHandler.c')
-rw-r--r--src/backend/rewrite/rewriteHandler.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/backend/rewrite/rewriteHandler.c b/src/backend/rewrite/rewriteHandler.c
index 3123ee274db..d8305696418 100644
--- a/src/backend/rewrite/rewriteHandler.c
+++ b/src/backend/rewrite/rewriteHandler.c
@@ -2217,6 +2217,9 @@ view_has_instead_trigger(Relation view, CmdType event)
* is auto-updatable. Returns NULL (if the column can be updated) or a message
* string giving the reason that it cannot be.
*
+ * The returned string has not been translated; if it is shown as an error
+ * message, the caller should apply _() to translate it.
+ *
* Note that the checks performed here are local to this view. We do not check
* whether the referenced column of the underlying base relation is updatable.
*/
@@ -2256,6 +2259,9 @@ view_col_is_auto_updatable(RangeTblRef *rtr, TargetEntry *tle)
* view_query_is_auto_updatable - test whether the specified view definition
* represents an auto-updatable view. Returns NULL (if the view can be updated)
* or a message string giving the reason that it cannot be.
+
+ * The returned string has not been translated; if it is shown as an error
+ * message, the caller should apply _() to translate it.
*
* If check_cols is true, the view is required to have at least one updatable
* column (necessary for INSERT/UPDATE). Otherwise the view's columns are not
@@ -2396,6 +2402,9 @@ view_query_is_auto_updatable(Query *viewquery, bool check_cols)
* required columns can be updated) or a message string giving the reason that
* they cannot be.
*
+ * The returned string has not been translated; if it is shown as an error
+ * message, the caller should apply _() to translate it.
+ *
* This should be used for INSERT/UPDATE to ensure that we don't attempt to
* assign to any non-updatable columns.
*