src/pl/tcl/pltcl.c
static pltcl_interp_desc *
pltcl_fetch_interp(Oid prolang, bool pltrusted)
{
	Oid			user_id;
	pltcl_interp_desc *interp_desc;
	bool		found;

	/* Find or create the interpreter hashtable entry for this userid */
	if (pltrusted)
		user_id = GetUserId();
	else
		user_id = InvalidOid;

	interp_desc = hash_search(pltcl_interp_htab, &user_id,
							  HASH_ENTER,
							  &found);
	if (!found)
		interp_desc->interp = NULL;

	/* If we haven't yet successfully made an interpreter, try to do that */
	if (!interp_desc->interp)
		pltcl_init_interp(interp_desc, prolang, pltrusted);

	return interp_desc;
}
/**********************************************************************
 * pltcl_fetch_interp() - fetch the Tcl interpreter to use for a function
 *
 * This also takes care of any on-first-use initialization required.
 **********************************************************************/
fetch the Tcl interpreter to use for a function
This also takes care of any on-first-use initialization required.
fetch the Tcl interpreter to use for a function This also takes care of any on - first - use initialization required .
static pltcl_interp_desc *
pltcl_fetch_interp(Oid prolang, bool pltrusted)
{
	Oid			user_id;
	pltcl_interp_desc *interp_desc;
	bool		found;
	if (pltrusted)
		user_id = GetUserId();
	else
		user_id = InvalidOid;
	interp_desc = hash_search(pltcl_interp_htab, &user_id,
							  HASH_ENTER,
							  &found);
	if (!found)
		interp_desc->interp = NULL;
	if (!interp_desc->interp)
		pltcl_init_interp(interp_desc, prolang, pltrusted);
	return interp_desc;
}
static pltcl_interp_desc * pltcl_fetch_interp ( Oid prolang , bool pltrusted ) { Oid user_id ; pltcl_interp_desc * interp_desc ; bool found ; if ( pltrusted ) user_id = GetUserId ( ) ; else user_id = InvalidOid ; interp_desc = hash_search ( pltcl_interp_htab , & user_id , HASH_ENTER , & found ) ; if ( ! found ) interp_desc -> interp = NULL ; if ( ! interp_desc -> interp ) pltcl_init_interp ( interp_desc , prolang , pltrusted ) ; return interp_desc ; }
pltcl_fetch_interp() - fetch the Tcl interpreter to use for a function
 This also takes care of any on-first-use initialization required.
pltcl_fetch_interp () - fetch the Tcl interpreter to use for a function This also takes care of any on - first - use initialization required .
/* Find or create the interpreter hashtable entry for this userid */ /* If we haven't yet successfully made an interpreter, try to do that */