Specific problems to be fixed:
==============================

* Revise error handling. Currently, errors that originate in
  libmemcache are logged twice: first via libmemcache (in
  its own baroque format), and also as a PostgreSQL error
  via elog(ERROR). Better would be to present both errors
  via ereport and the ERRDETAIL field.

* _incr() and _decr() are declared to use the PG INT4 type, but the
  underlying memcached protocol uses an unsigned 32-bit int, so there
  is likely a sign conversion problem here. The same might apply to
  memcache_server_find(INT4), which declares its argument to be of
  type INT4 but fetches it via PG_GETARG_UINT32(x).

* Error handling for memcache_decr() and memcache_incr() is
  currently bad: memcache_incr('non existent key') just yields
  0. memcache_decr() could yield 0 even for unsigned integers, and in
  any case this is a terrible way to signal a logical error to the
  application programmer.

* Update docs for recent API changes.

New features:
=============

* Add a function to disconnect from all servers.

* Add a function to report the libmemcache / memcached version.

* Allow binary data to be stored and fetched.

* Support the user-specified "flag" concept for _add(), _set(),
  and _replace(): 1.1 and earlier supported this, but didn't
  provide a way to actually query the flag value, so it
  wasn't very useful.

* Add regression tests.

Other possible changes:
=======================

* memcache_server_add() doesn't do anything special about duplicate
  servers. Is this the right behavior? ISTM that we should probably
  reject the _add() and error out, perhaps in libmemcache rather than
  pgmemcache itself.

* If possible, adjust the code to avoid depending on the
  implementation details of the Postgres datetime types: UDFs with
  "#ifdef HAVE_INT64_TIMESTAMP" are inherently suspicious.

* Consider making the "port" argument to memcache_server_add()
  an INT.

* Consider supporting NULL hash values properly.

* Error handling: how should errors be reported? The current functions
  usually return true/false depending on if an error occurred, but an
  alternative (perhaps cleaner) would be to signal errors via elog.

Infrastructure:
===============

* Better documentation.
    * More information needed on "best practices": how to do
      cache invalidation correctly, how to use LISTEN/NOTIFY,
      how to configure a memcached server, etc.

* Website of some kind.

