From: | Brian Hurt <bhurt(at)janestcapital(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | korryd(at)enterprisedb(dot)com, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Last minute mini-proposal (I know, I know) for PQexecf() |
Date: | 2007-04-05 13:55:18 |
Message-ID: | 4614FFC6.9070605@janestcapital.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
My apologies for the late reply...
Tom Lane wrote:
><korryd(at)enterprisedb(dot)com> writes:
>
>
>>I'd like to see a new variant on PQexec():
>> PGresult * PQexecf(PGconn *conn, const char *fmt, ...);
>>
>>
>
>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.
>
>
>
The advantage of using stock sprintf commands is that most compilers
understand them these days, and can check that the arguments given match
the format string. If you go with your own format specifiers, this is
no longer true.
Brian
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2007-04-05 14:13:35 | Re: pg_index updates and SI invalidation |
Previous Message | Bruce Momjian | 2007-04-05 13:54:29 | Re: Buildfarm failures en masse |