MCPcopy Create free account
hub / github.com/apache/cloudberry / dbms_sql_bind_array_5

Function dbms_sql_bind_array_5

gpcontrib/orafce/dbms_sql.c:679–705  ·  view source on GitHub ↗

* CREATE PROCEDURE dbms_sql.bind_array(c int, name varchar2, value anyarray, index1 int, index2 int); */

Source from the content-addressed store, hash-verified

677 * CREATE PROCEDURE dbms_sql.bind_array(c int, name varchar2, value anyarray, index1 int, index2 int);
678 */
679Datum
680dbms_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
707static ColumnData *
708get_col(CursorData *c, int position, bool append)

Callers

nothing calls this directly

Calls 3

bind_arrayFunction · 0.85
errcodeFunction · 0.50
errmsgFunction · 0.50

Tested by

no test coverage detected