Re: PLPGSQL - extra column existence in trigger

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Durumdara <durumdara(at)gmail(dot)com>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: PLPGSQL - extra column existence in trigger
Date: 2022-05-07 14:41:44
Message-ID: CAKFQuwbEbnpexHDEz+PE7C+gDp1S6_Kkq+YVKO_0Qa09tx=RdA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Saturday, May 7, 2022, Durumdara <durumdara(at)gmail(dot)com> wrote:

>
>
> So is there any syntax to not fall on missing columns?
>

No. I’d probably approach this by generically converting the NEW record to
json and working with that. Non-existent object keys return null when
accessed.

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Guillaume Lelarge 2022-05-07 16:11:32 Re: pg_dump: VACUUM and REINDEXING
Previous Message Hasan Marzooq 2022-05-07 13:27:29 Re: pg_dump: VACUUM and REINDEXING