While running rdsadmin.rds_file_util.read_text_file, I got error "ORA-00910: specified length too long for its datatype". After extensive investigation, I found out the cause.
The system is Oracle Database 19c. The data type is VARCHAR2. Parameter max_string_size is "STANDARD".
These scenarios could lead to ORA-00910
Create table
The most obvious possible cause of ORA-00910 is during table creation.
Pipe row with > 4000 characters in a field
It is also possible to get ORA-00910 while executing a pipelined table function. In the following code, if l_text.text length exceeds 4000 characters, ORA-00910 will appear.
This simplified example is similar to the logic in RDS read_text_file.
A workaround is:
Related errors
Please distinguish ORA-00910 from other, similarly-worded errors.
PLS-00215: String length constraints must be in range (1 .. 32767)
ORA-06502: PL/SQL: numeric or value error: character string buffer too small