public inbox for [email protected]  
help / color / mirror / Atom feed
From: Santosh Udupi <[email protected]>
To: David G. Johnston <[email protected]>
Cc: pgsql-novice <[email protected]>
Subject: Re: Not able to restore generated columns due to a function
Date: Tue, 26 Jan 2021 07:42:19 -0800
Message-ID: <CACLRvHZ3YoDaZbX65hk0WXVJNAwH-XMZDdTGVCMrPSCGKGnrPw@mail.gmail.com> (raw)
In-Reply-To: <CAKFQuwZ32d=LmMwyfzFRiMD4hC0zkXmuiVr0rbmLXPGZzpzgPQ@mail.gmail.com>
References: <CACLRvHbmJ=JVnWDHUUN9r=EY1_gZx-cnAPhAViLZGGW-PePNkw@mail.gmail.com>
	<CAKFQuwZ32d=LmMwyfzFRiMD4hC0zkXmuiVr0rbmLXPGZzpzgPQ@mail.gmail.com>

  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 <
[email protected]> wrote:

> On Tue, Jan 26, 2021 at 8:16 AM Santosh Udupi <[email protected]> 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.
>
>


view thread (4+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Not able to restore generated columns due to a function
  In-Reply-To: <CACLRvHZ3YoDaZbX65hk0WXVJNAwH-XMZDdTGVCMrPSCGKGnrPw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox