[PyGreSQL] Update to bytea escape patch, bugfix, enhancement
Charlie Dyson
charlie at charliedyson.net
Fri Sep 10 06:04:53 EDT 2004
On Thu, 2004-09-09 at 23:57, kavoos at issn.org wrote:
> >Thanks to Kavous Bojnourdi for pointing out that
> >the pg client library
> >has functions that do what I was trying to do -
> >this means more code
> >reuse (which is nice). Here is my version of his
> >version of my patch,
> >with two changes incorporated. Firstly the
> >unnecessary output variable
> >and the memory copying were removed from both
> >functions.
>
> Yep, see it, but too late ... :)
>
> >Secondly the
> >pgbytea_unescape called Py_BuildValue with an "s",
> >rather than an "s#"
> >argument, leaving it unable to cope with any
> >"premature" zero bytes,
> >which it would have assumed to be terminators.
>
> Good shot, i don't see it because i store special
> binarie type without any zero byte :)
>
> Thank you for taking time to correct my mistakes.
No problem - zero bytes are a pain anyway. Any chance of this patch
getting into the next release version? Not particularly important for me
at the moment, because I can just import a simple module that just
provides those two functions, and use the release version of PyGreSQL
for everything else.
Regards,
_______ ___ ___
/ ___/ / ___ _____/ (_)__ / _ \__ _____ ___ ___
/ /__/ _ \/ _ `/ __/ / / -_) / // / // (_-</ _ \/ _ \
\___/_//_/\_,_/_/ /_/_/\__/ /____/\_, /___/\___/_//_/
/___/
charlie at charlie dyson dot net
More information about the PyGreSQL
mailing list