On 10.11.25 10:06, Chao Li wrote:
The list is defined in encode.c (search for enclist in the file), I guess we 
can add a function to return a string with a encoding names.

2
```
+                                errhint("Valid binary encodings are: %s",
+                                                "\"hex\", \"base64\", \"base64url\", 
\"escape\".")));
```

Looks like putting punctuation inside %s is not normal. By looking at other 
hint messages, they usually do something like:

```
errhint("Perhaps you meant the option \"%s\".”, value)
```

Yes, this is because the punctuation is itself subject to translation. (Most obviously, different languages use different quotation marks.) So the preferred style is something like

errhint("Valid encodings are: \"%s\", \"%s\", and \"%s\", "hex", ...)

or however many you need.

See also <https://www.postgresql.org/message-id/202511070936.jj4o4ktd4b6l%40alvherre.pgsql> for a related discussion.



Reply via email to