Re: Last minute mini-proposal (I know, I know) for PQexecf()
От | Brian Hurt |
---|---|
Тема | Re: Last minute mini-proposal (I know, I know) for PQexecf() |
Дата | |
Msg-id | 4614FFC6.9070605@janestcapital.com обсуждение исходный текст |
Ответ на | Re: Last minute mini-proposal (I know, I know) for PQexecf() (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
My apologies for the late reply...<br /><br /> Tom Lane wrote:<br /><blockquote cite="mid26530.1175301022@sss.pgh.pa.us"type="cite"><pre wrap=""><a class="moz-txt-link-rfc2396E" href="mailto:korryd@enterprisedb.com"><korryd@enterprisedb.com></a>writes: </pre><blockquote type="cite"><pre wrap="">I'dlike to see a new variant on PQexec(): PGresult * PQexecf(PGconn *conn, const char *fmt, ...); </pre></blockquote><prewrap=""> Way too late for 8.3 --- if we were going to do something like this, we should think first and program later. In particular, blindly adopting the sprintf format string definition doesn't seem very helpful. The sorts of escapes I'd want to have are "properly quoted SQL identifier", "properly quoted SQL literal", etc. A large fraction of what sprintf knows about is more or less irrelevant to the task of creating SQL commands. </pre></blockquote> The advantage of using stock sprintf commands is that most compilers understand them these days, andcan check that the arguments given match the format string. If you go with your own format specifiers, this is no longertrue.<br /><br /> Brian<br /><br />
В списке pgsql-hackers по дате отправления: