From: | Santosh Udupi <email(at)hitha(dot)net> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | pgsql-novice <pgsql-novice(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Not able to restore generated columns due to a function |
Date: | 2021-01-26 15:52:23 |
Message-ID: | CACLRvHYUrYjjZTEfru8NejhpzKNVM-LTJ5BHTG8auyx3hhUkEg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
I schema qualified the function and it worked!! Thanks a lot!!
On Tue, Jan 26, 2021 at 7:42 AM Santosh Udupi <email(at)hitha(dot)net> wrote:
> Thank you David for your suggestions. I will fix the function and try.
>
> On Tue, Jan 26, 2021 at 7:21 AM David G. Johnston <
> david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
>
>> On Tue, Jan 26, 2021 at 8:16 AM Santosh Udupi <email(at)hitha(dot)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.
>>
>>
From | Date | Subject | |
---|---|---|---|
Next Message | Martin Goodson | 2021-01-28 13:28:04 | Transparent Data Encryption in PostgreSQL? |
Previous Message | Santosh Udupi | 2021-01-26 15:42:19 | Re: Not able to restore generated columns due to a function |