On 7/16/21 3:26 PM, David Gauthier wrote:
> This stored procedure ...
> dvdb=# alter table projects add constraint validate_sibling_project_csv
> check (validate_proj_csv(sibling_project_csv) = 0);
> ERROR: upper bound of FOR loop cannot be null
> CONTEXT: PL/pgSQL function validate_proj_csv(character varying) line 14
> at FOR with integer loop variable
>
> What's going on ?
I'm going to say you have a NULL value in sibling_project_csv in the table.
> How to get this to work ?
>
--
Adrian Klaver
adrian.klaver@aklaver.com