I had a brief look at this today. Basically, I thought of adding a new
routine to dumputils.c thus:
void appendStringLiteralDQ(PQExpBuffer buf, const char *str, const
char *dqprefix)
and using it in dumping function bodies and comments on all objects,
with a prefix argument of "function" and "comment" respectively. There
might be other places where we want to use dollar quoting, but this
would be a good start, ISTM.
Basically, this routine would start with $ (+ dqprefix if not null) and
then keep adding characters (in turn "_1234567890") until that string
was not found in str, then appending "$" and using that as the delimiter.
Thoughts?
cheers
andrew