568 #if POSTGIS_PROJ_VERSION < 60
569 elog(ERROR,
"%s is not supported with Proj < 6.0", __func__);
571 FuncCallContext *funcctx;
572 MemoryContext oldcontext;
582 if (SRF_IS_FIRSTCALL())
584 funcctx = SRF_FIRSTCALL_INIT();
585 oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
602 if (get_call_result_type(fcinfo, 0, &funcctx->tuple_desc) != TYPEFUNC_COMPOSITE)
604 ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
605 errmsg(
"%s called with incompatible return type", __func__)));
608 BlessTupleDesc(funcctx->tuple_desc);
609 funcctx->user_fctx = state;
610 MemoryContextSwitchTo(oldcontext);
614 funcctx = SRF_PERCALL_SETUP();
615 state = funcctx->user_fctx;
620 SRF_RETURN_DONE(funcctx);
626 funcctx->tuple_desc);
629 SRF_RETURN_NEXT(funcctx,
result);
632 SRF_RETURN_DONE(funcctx);
char result[OUT_DOUBLE_BUFFER_SIZE]
static struct srs_data * srs_state_init()
static void srs_state_codes(const char *auth_name, struct srs_data *state)
static Datum srs_tuple_from_entry(const struct srs_entry *entry, TupleDesc tuple_desc)
struct srs_entry * entries