I've found that PQunescapeByte was unavailable as of version 7.2 of postgresql. I'd embed its definition in pgsql2shp.c, where it is used from. Does anyone see any problem with this ? --strk;