> > hash = (text *)palloc(hlen+1); ??? palloc(hlen + VARHDRSZ) > > memset(VARDATA(hash), 0, hlen); > SHA512(VARDATA(plain), hlen, VARDATA(hash)); ++ VARATT_SIZEP (hash) = VARHDRSZ + ....; > PG_RETURN_TEXT_P(hash); > } > > ---------------------------(end of broadcast)--------------------------- > TIP 3: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq > ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster