Martin French <Martin.French@xxxxxxxxxxxxx> writes: > So out of curiosity, what would be your approach for data preservation > cross call? Usually I'd allocate the space in fcinfo->flinfo->fn_mcxt (which is a query-lifespan context) and keep a pointer to it in fcinfo->flinfo->fn_extra (which is a void * field that a C function can do what it pleases with). There are plenty of examples in the Postgres source code. If you are looking to cache data longer than one query then it takes more thought. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general