Re: [GENERAL] Problems with INSERT INTO?
| От | Dustin Sallings |
|---|---|
| Тема | Re: [GENERAL] Problems with INSERT INTO? |
| Дата | |
| Msg-id | Pine.SGI.3.95.990524103209.1477A-100000@bleu.west.spy.net обсуждение исходный текст |
| Ответ на | Re: [GENERAL] Problems with INSERT INTO? (Simon Drabble <simond@foxlink.net>) |
| Список | pgsql-general |
On Mon, 24 May 1999, Simon Drabble wrote:
# char query[LOTS_OF_ROOM];
# sprintf(query, "INSERT INTO octects VALUES(%d)", a);
#
# PQexec(conn, query);
snprintf would probably be a better choice.
# -or- download my libpq wrapper, which allows you to perform queries without
# using a temporary char array, in a manner similar to printf(). Available via
# anon ftp from
#
# brainkarma.dyndns.org/pub/dblib/
I was about to suggest something like this be part of the core
library. It makes a lot of sense, and that's what vsnprintf is for. :)
--
SA, beyond.com My girlfriend asked me which one I like better.
pub 1024/3CAE01D5 1994/11/03 Dustin Sallings <dustin@spy.net>
| Key fingerprint = 87 02 57 08 02 D0 DA D6 C8 0F 3E 65 51 98 D8 BE
L_______________________ I hope the answer won't upset her. ____________
В списке pgsql-general по дате отправления: