645 FuncCallContext *funcctx;
646 MemoryContext oldcontext;
649 text* auth_name = PG_GETARG_TEXT_P(0);
658 if (SRF_IS_FIRSTCALL())
664 funcctx = SRF_FIRSTCALL_INIT();
665 oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
668 funcctx->user_fctx = state;
669 MemoryContextSwitchTo(oldcontext);
673 funcctx = SRF_PERCALL_SETUP();
674 state = funcctx->user_fctx;
679 SRF_RETURN_DONE(funcctx);
684 result = PointerGetDatum(auth_code);
688 SRF_RETURN_NEXT(funcctx,
result);
691 SRF_RETURN_DONE(funcctx);
692 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)
struct srs_entry * entries