fixed strndup usage in the pgsql ext