Re: [HACKERS] fmtId() and pg_dump

2002-07-17 Thread Peter Eisentraut
Neil Conway writes: > My suggestion is: since fmtId() is almost always used with > appendPQExpBuffer(), we should add a wrapper function to pg_dump > that accepts an extra escape sequence (%S, or %i, perhaps), which > would properly quote the input string before passing it to > appendPQExpBuffer(

Re: [HACKERS] fmtId() and pg_dump

2002-07-15 Thread Bruce Momjian
Interesting idea. Not sure how you are going to do that since appendPQExpBuffer uses vsnprintf. Would you spin through the format string and modify the pointers sent to vsnprintf? Seems like a lot of work. FYI, the 7.2 code had fmtId called pretty messed up in certain places but I think I fix

[HACKERS] fmtId() and pg_dump

2002-07-15 Thread Neil Conway
The fmtId() function used in pg_dump for optional quoting identifiers has bothered me for a while now. The API is confusing: the returned value needs to be used before fmtId() is called again, because the buffer the return value points to is re-used for each call of fmtId(). That leads to bugs for