* Returns a temporary PQExpBuffer, valid until the next call to the function. * This is used by fmtId and fmtQualifiedId. * * Non-reentrant and non-thread-safe but reduces memory leakage. You can * replace this with a custom version by setting the getLocalPQExpBuffer * function pointer. */
| 39 | * function pointer. |
| 40 | */ |
| 41 | static PQExpBuffer |
| 42 | defaultGetLocalPQExpBuffer(void) |
| 43 | { |
| 44 | static PQExpBuffer id_return = NULL; |
| 45 | |
| 46 | if (id_return) /* first time through? */ |
| 47 | { |
| 48 | /* same buffer, just wipe contents */ |
| 49 | resetPQExpBuffer(id_return); |
| 50 | } |
| 51 | else |
| 52 | { |
| 53 | /* new buffer */ |
| 54 | id_return = createPQExpBuffer(); |
| 55 | } |
| 56 | |
| 57 | return id_return; |
| 58 | } |
| 59 | |
| 60 | /* |
| 61 | * Set the encoding that fmtId() and fmtQualifiedId() use. |
nothing calls this directly
no test coverage detected