Re: Not able to restore generated columns due to a function

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Not able to restore generated columns due to a function
Дата
Msg-id CAKFQuwZ32d=LmMwyfzFRiMD4hC0zkXmuiVr0rbmLXPGZzpzgPQ@mail.gmail.com
обсуждение исходный текст
Ответ на Not able to restore generated columns due to a function  (Santosh Udupi <email@hitha.net>)
Ответы Re: Not able to restore generated columns due to a function  (Santosh Udupi <email@hitha.net>)
Список pgsql-novice
On Tue, Jan 26, 2021 at 8:16 AM Santosh Udupi <email@hitha.net> wrote:
Hi,

I am trying to restore a database with a generated column. The generated column is created using the function below. This column doesn't get restored. Can you tell me what I am doing wrong in the function?

I am calling a function within a function. Could this be the issue? 


Didn't look too deeply but normally failures of this nature mean you didn't schema-qualify your function names, either in the code body or with a SET attached to the create function command.

To compound matters you are ignoring all errors by "exception when others".  You should avoid "exception" if possible, including by testing for valid data first instead of letting the called function fail.

Your functions also are not immutable due to being sensitive to timezone settings.

David J.

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

Предыдущее
От: Santosh Udupi
Дата:
Сообщение: Not able to restore generated columns due to a function
Следующее
От: Santosh Udupi
Дата:
Сообщение: Re: Not able to restore generated columns due to a function