Undocumented limitations on PQsetClientEncoding()
Started by PG Bug reporting form3 days ago1 messagesdocs
Thread notes
1 note#docs
hackorum-bot#docs
hackorum-bot
2 days ago@global #docs
#docs
Stepping through
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/19/libpq-control.html
Description:
The docs for PQsetClientEncoding (in libpq-control.html) do not mention a
few things applications need to keep in mind:
* It executes SQL, so I guess it wouldn't work during a COPY.
* It doesn't escape the encoding name, so don't blindly accept encoding
names from untrusted sources.
(In fact maybe the function should outright reject encoding names with
quotes or other suspicious characters in them.)