65 for (
const char *sp = instr; *sp; sp++)
75 else if (sp[1] ==
'\0')
79 pg_log_error(
"invalid value for parameter \"%s\": \"%s\"", param_name, instr);
84 errcode(ERRCODE_INVALID_PARAMETER_VALUE),
85 errmsg(
"invalid value for parameter \"%s\": \"%s\"", param_name, instr),
86 errdetail(
"String ends unexpectedly after escape character \"%%\"."));
98 for (
const char *lp = letters; *lp; lp++)
100 char *
val = va_arg(ap,
char *);
118 pg_log_error(
"invalid value for parameter \"%s\": \"%s\"", param_name, instr);
123 errcode(ERRCODE_INVALID_PARAMETER_VALUE),
124 errmsg(
"invalid value for parameter \"%s\": \"%s\"", param_name, instr),
125 errdetail(
"String contains unexpected placeholder \"%%%c\".", *sp));
int errdetail(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define pg_log_error(...)
#define pg_log_error_detail(...)
char * replace_percent_placeholders(const char *instr, const char *param_name, const char *letters,...)
void appendStringInfoString(StringInfo str, const char *s)
void appendStringInfoChar(StringInfo str, char ch)
void initStringInfo(StringInfo str)