| 120 | * return s->data; |
| 121 | */ |
| 122 | pg_attribute_printf(1, 2) inline static const char * |
| 123 | FormatSqlQuery(const char *queryFormat, ...) |
| 124 | { |
| 125 | StringInfoData cmdbuf; |
| 126 | |
| 127 | initStringInfo(&cmdbuf); |
| 128 | for (;;) |
| 129 | { |
| 130 | va_list args; |
| 131 | int needed; |
| 132 | |
| 133 | va_start(args, queryFormat); |
| 134 | needed = appendStringInfoVA(&cmdbuf, queryFormat, args); |
| 135 | va_end(args); |
| 136 | if (needed == 0) |
| 137 | { |
| 138 | break; /* success */ |
| 139 | } |
| 140 | enlargeStringInfo(&cmdbuf, needed); |
| 141 | } |
| 142 | |
| 143 | return cmdbuf.data; |
| 144 | } |
| 145 | |
| 146 | #endif |
no outgoing calls
no test coverage detected