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

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: <CAKFQuwZ32d=LmMwyfzFRiMD4hC0zkXmuiVr0rbmLXPGZzpzgPQ@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