* format_function_signature: generate function name and argument list * * This is like format_function_arguments_old except that only a minimal * list of input argument types is generated; this is sufficient to * reference the function, but not to define it. * * If honor_quotes is false then the function name is never quoted. * This is appropriate for use in TOC tags, but not in SQL command
| 13290 | * This is appropriate for use in TOC tags, but not in SQL commands. |
| 13291 | */ |
| 13292 | static char * |
| 13293 | format_function_signature(Archive *fout, const FuncInfo *finfo, bool honor_quotes) |
| 13294 | { |
| 13295 | PQExpBufferData fn; |
| 13296 | int j; |
| 13297 | |
| 13298 | initPQExpBuffer(&fn); |
| 13299 | if (honor_quotes) |
| 13300 | appendPQExpBuffer(&fn, "%s(", fmtId(finfo->dobj.name)); |
| 13301 | else |
| 13302 | appendPQExpBuffer(&fn, "%s(", finfo->dobj.name); |
| 13303 | for (j = 0; j < finfo->nargs; j++) |
| 13304 | { |
| 13305 | if (j > 0) |
| 13306 | appendPQExpBufferStr(&fn, ", "); |
| 13307 | |
| 13308 | appendPQExpBufferStr(&fn, |
| 13309 | getFormattedTypeName(fout, finfo->argtypes[j], |
| 13310 | zeroIsError)); |
| 13311 | } |
| 13312 | appendPQExpBufferChar(&fn, ')'); |
| 13313 | return fn.data; |
| 13314 | } |
| 13315 | |
| 13316 | |
| 13317 | /* |
no test coverage detected