Go to file
Bruce Momjian 4e1f986098 I found the libpq function PGunescapeBytea a little slow. It was taking a
minute and a half to decode a 500Kb on a fairly fast machine. I think the
culprit is sscanf.

I attach a patch that replaces the function with one used to perform the same
task in pyPgSQL (a Python interface to PostgreSQL). This code was written by
Billy Allie, author of pyPgSQL. I've changed a few variable names to match
those in the original code and removed a bit of Pythonness.

Billy has kindly looked at the code and points out that it is slightly
stricter than the original implementation and if it encounters an invalid
bytea such as '\12C' it drops the unescape '\' and outputs '12C'.

The code is licensed by the author under a BSD license.

I've performed limited testing of the function by putting JPEGs into
PostgreSQL, extracting them using them using the new function and diffing
against the original files.

The new function is significantly faster on my machine with the JPEGs being
decoded in less than a second. I attach a modified libpq example program that
I used for my testing.

Ben Lamb.
2003-06-12 01:17:19 +00:00
config Adjust configure so that extern tzname[] will be checked for 2003-05-22 16:39:30 +00:00
contrib Update expected file to match new _int.sql. 2003-06-11 19:43:36 +00:00
doc Add add_missing_from GUC variable. 2003-06-11 22:13:22 +00:00
src I found the libpq function PGunescapeBytea a little slow. It was taking a 2003-06-12 01:17:19 +00:00
aclocal.m4 Remove leftovers from subproject removals. Fixes for Python and Kerberos 2002-09-04 22:54:18 +00:00
configure Add Rendezvous support to postmaster, from Chris Campbell 2003-06-11 06:56:07 +00:00
configure.in Add Rendezvous support to postmaster, from Chris Campbell 2003-06-11 06:56:07 +00:00
COPYRIGHT
GNUmakefile.in First step to removing /contrib/retep, with Peter Mount's approval. 2002-10-21 00:12:46 +00:00
HISTORY Fix misstatement in release-notes item. 2003-05-26 18:58:26 +00:00
INSTALL Regenerate 2002-11-21 23:33:22 +00:00
Makefile
README Improve wording. 2002-11-11 20:03:40 +00:00
register.txt Update URL to point to proper location. 2003-06-02 15:01:03 +00:00

PostgreSQL Database Management System
=====================================
  
This directory contains the source code distribution of the PostgreSQL
database management system.

PostgreSQL is an advanced object-relational database management system
that supports an extended subset of the SQL standard, including
transactions, foreign keys, subqueries, triggers, user-defined types
and functions.  This distribution also contains several language
bindings, including C, Perl, Python, and Tcl, as well as a JDBC
driver.

The ODBC and C++ interfaces have been moved to the PostgreSQL Projects
Web Site at http://gborg.postgresql.org for separate maintenance.

See the file INSTALL for instructions on how to build and install
PostgreSQL.  That file also lists supported operating systems and
hardware platforms and contains information regarding any other
software packages that are required to build or run the PostgreSQL
system.  Changes between all PostgreSQL releases are recorded in the
file HISTORY.  Copyright and license information can be found in the
file COPYRIGHT.  A comprehensive documentation set is included in this
distribution; it can be read as described in the installation
instructions.

The latest version of this software may be obtained at
ftp://ftp.postgresql.org/pub/.  For more information look at our web
site located at http://www.postgresql.org/.