Search Postgresql Archives

Re: PLPGSQL - extra column existence in trigger

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear David!

That was a very good idea! I have integrated it! :-)

Priorly I had another idea: I made a DDL to extend the table with "add column if not exists" elements.
But what you suggested is better. Thank you!

Best wishes
dd

David G. Johnston <david.g.johnston@xxxxxxxxx> ezt írta (időpont: 2022. máj. 7., Szo, 16:41):
On Saturday, May 7, 2022, Durumdara <durumdara@xxxxxxxxx> 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. 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux