We really need to be careful here, and make sure what we end up with doesn't break something else. A few more tests like shared_buffers and other simple values is wise here, but we should probably verify the quoting rules ourselves.