Re: unQuoteBytea
Gerhard Häring <[email protected]>
| Newsgroups | gmane.comp.python.db.pypgsql.user |
|---|---|
| Message-ID | <[email protected]> |
Ben Lamb wrote: > The pgUnquoteBytea function in libpq is rather slow (it uses scanf). Noticing > that the pyPgSQL version was much faster I lifted the code and put it into > libpq. > > Do you mind if I submit the change to the libpq developer with full > acknowledgement that the code came from pyPgSQL? That's what Open Source is about, right? So go ahead and submit it to the PostgreSQL developers at pgsql-patches-RDL/[email protected] Billy wrote that particular function if the question of copyright should occur on the patches list. pyPgSQL is also licensed under a BSD license so they should have no problems accepting the patch. > BTW Unescaping a 200Kb JPEG stored in a PostgreSQL bytea field took 1.5 mins > before and 0.09 seconds afterwards on a 2Ghz machine! Wow, I wouldn't have imagined that (some platforms') scanf suck so much. Doesn't look like libpq's bytea unquoting function was used very much in real life, does it? -- Gerhard ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf