Re: Getting "ERROR: upper bound of FOR loop cannot be null" when trying to use a stored proc in a check constraint def.

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Getting "ERROR: upper bound of FOR loop cannot be null" when trying to use a stored proc in a check constraint def.
Дата
Msg-id ec8bce06-c6e5-53ff-8204-d0b014b12581@aklaver.com
обсуждение исходный текст
Ответ на Getting "ERROR: upper bound of FOR loop cannot be null" when trying to use a stored proc in a check constraint def.  (David Gauthier <davegauthierpg@gmail.com>)
Список pgsql-general
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



В списке pgsql-general по дате отправления:

Предыдущее
От: David Gauthier
Дата:
Сообщение: Getting "ERROR: upper bound of FOR loop cannot be null" when trying to use a stored proc in a check constraint def.
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Frequetly updated partial index leads to bloat on index for Postresql 11