> ISTM that in this line: > > keying = (text *)palloc( keylen + unamelen ); > > You forgot to include the length of the header VARHDRSZ. > Aha, that'd be it, it's been a long day. Thanks Martijn -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general