Re: fixing PQsetvalue()
От
Tom Lane
Тема
Re: fixing PQsetvalue()
Дата
Msg-id
15336.1311265199@sss.pgh.pa.us
Ответ на
Re: fixing PQsetvalue() (Robert Haas)
Список
Дерево обсуждения
fixing PQsetvalue() Merlin Moncure <mmoncure@gmail.com>
Re: fixing PQsetvalue() Pavel Golub <pavel@microolap.com>
Re: fixing PQsetvalue() Pavel Golub <pavel@microolap.com>
Re: fixing PQsetvalue() Dmitriy Igrishin <dmitigr@gmail.com>
Re: fixing PQsetvalue() Andrew Chernow <ac@esilo.com>
Re: fixing PQsetvalue() Merlin Moncure <mmoncure@gmail.com>
Re: fixing PQsetvalue() Pavel Golub <pavel@microolap.com>
Re: fixing PQsetvalue() Robert Haas <robertmhaas@gmail.com>
Re: fixing PQsetvalue() Tom Lane <tgl@sss.pgh.pa.us>
Re: fixing PQsetvalue() Robert Haas <robertmhaas@gmail.com>
Re: fixing PQsetvalue() Merlin Moncure <mmoncure@gmail.com>
Re: fixing PQsetvalue() Dmitriy Igrishin <dmitigr@gmail.com>
Robert Haas writes: > So I finally got around to taking a look at this patch, and I guess my > basic feeling is that I like it. The existing code is pretty weird > and inconsistent: the logic in PQsetvalue() basically does the same > thing as the logic in pqAddTuple(), but incompatibly and less > efficiently. Unifying them seems sensible, and the fix looks simple > enough to back-patch. Yeah, I've been looking at it too. For some reason I had had the idea that the proposed patch complicated the code, but actually it's simplifying it by removing almost-duplicate code. So that's good. The patch as proposed adds back a bug in return for the one it fixes (you can not free() the result of pqResultAlloc()), but that's easily fixed. Will fix and commit. regards, tom lane
В списке pgsql-hackers по дате отправления