642 FuncCallContext *funcctx;
643 MemoryContext oldcontext;
646 text* auth_name = PG_GETARG_TEXT_P(0);
655 if (SRF_IS_FIRSTCALL())
661 funcctx = SRF_FIRSTCALL_INIT();
662 oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
665 funcctx->user_fctx = state;
666 MemoryContextSwitchTo(oldcontext);
670 funcctx = SRF_PERCALL_SETUP();
671 state = funcctx->user_fctx;
676 SRF_RETURN_DONE(funcctx);
681 result = PointerGetDatum(auth_code);
685 SRF_RETURN_NEXT(funcctx,
result);
688 SRF_RETURN_DONE(funcctx);
689 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