* CREATE PROCEDURE dbms_sql.bind_array(c int, name varchar2, value anyarray, index1 int, index2 int); */
| 677 | * CREATE PROCEDURE dbms_sql.bind_array(c int, name varchar2, value anyarray, index1 int, index2 int); |
| 678 | */ |
| 679 | Datum |
| 680 | dbms_sql_bind_array_5(PG_FUNCTION_ARGS) |
| 681 | { |
| 682 | int index1, index2; |
| 683 | |
| 684 | if (PG_ARGISNULL(3) || PG_ARGISNULL(4)) |
| 685 | ereport(ERROR, |
| 686 | (errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED), |
| 687 | errmsg("index is NULL"))); |
| 688 | |
| 689 | index1 = PG_GETARG_INT32(3); |
| 690 | index2 = PG_GETARG_INT32(4); |
| 691 | |
| 692 | if (index1 < 0 || index2 < 0) |
| 693 | ereport(ERROR, |
| 694 | (errcode(ERRCODE_INVALID_PARAMETER_VALUE), |
| 695 | errmsg("index is below zero"))); |
| 696 | |
| 697 | if (index1 > index2) |
| 698 | ereport(ERROR, |
| 699 | (errcode(ERRCODE_INVALID_PARAMETER_VALUE), |
| 700 | errmsg("index1 is greater than index2"))); |
| 701 | |
| 702 | bind_array(fcinfo, index1, index2); |
| 703 | |
| 704 | return (Datum) 0; |
| 705 | } |
| 706 | |
| 707 | static ColumnData * |
| 708 | get_col(CursorData *c, int position, bool append) |
nothing calls this directly
no test coverage detected