* op_signature_string * Build a string representing an operator name, including arg type(s). * The result is something like "integer + integer". * * This is typically used in the construction of operator-not-found error * messages. */
| 611 | * messages. |
| 612 | */ |
| 613 | static const char * |
| 614 | op_signature_string(List *op, char oprkind, Oid arg1, Oid arg2) |
| 615 | { |
| 616 | StringInfoData argbuf; |
| 617 | |
| 618 | initStringInfo(&argbuf); |
| 619 | |
| 620 | if (oprkind != 'l') |
| 621 | appendStringInfo(&argbuf, "%s ", format_type_be(arg1)); |
| 622 | |
| 623 | appendStringInfoString(&argbuf, NameListToString(op)); |
| 624 | |
| 625 | appendStringInfo(&argbuf, " %s", format_type_be(arg2)); |
| 626 | |
| 627 | return argbuf.data; /* return palloc'd string buffer */ |
| 628 | } |
| 629 | |
| 630 | /* |
| 631 | * op_error - utility routine to complain about an unresolvable operator |
no test coverage detected