Hello, I am cleaning orafce module and I would to eliminate duplicit code with core. Is in core similar macro or function?
text* ora_clone_text(text *t) { text *result; result = palloc(VARSIZE(t)); SET_VARSIZE(result, VARSIZE(t)); memcpy(VARDATA(result), VARDATA(t), VARSIZE(t) - VARHDRSZ); return result; } It can be used for any varlena datatype. Thank you Pavel Stehule ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly