Skip to content

Commit

Permalink
Fixing error message style
Browse files Browse the repository at this point in the history
  • Loading branch information
codeforall committed Jul 24, 2024
1 parent 1517e04 commit d307857
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/catalog/tde_keyring.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,20 +547,19 @@ pg_tde_list_all_key_providers(PG_FUNCTION_ARGS)
if (rsinfo == NULL || !IsA(rsinfo, ReturnSetInfo))
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("pg_tde_list_all_key_providers: Set-valued function called in context that cannot accept a set.")));
errmsg("pg_tde_list_all_key_providers: set-valued function called in context that cannot accept a set")));
if (!(rsinfo->allowedModes & SFRM_Materialize))
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("pg_tde_list_all_key_providers: Materialize mode required, but it is not "
"allowed in this context.")));
errmsg("pg_tde_list_all_key_providers: materialize mode required, but it is not allowed in this context")));

/* Switch into long-lived context to construct returned data structures */
per_query_ctx = rsinfo->econtext->ecxt_per_query_memory;
oldcontext = MemoryContextSwitchTo(per_query_ctx);

/* Build a tuple descriptor for our result type */
if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE)
elog(ERROR, "pg_tde_list_all_key_providers: Return type must be a row type.");
elog(ERROR, "pg_tde_list_all_key_providers: return type must be a row type");

tupstore = tuplestore_begin_heap(true, false, work_mem);
rsinfo->returnMode = SFRM_Materialize;
Expand Down

0 comments on commit d307857

Please sign in to comment.