Search Postgresql Archives

Re: Need help with trigger

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

 



On Saturday, January 23, 2021, Condor <condor@xxxxxxxxxx> wrote:


Hello ppl,

I need help with trigger how to replace insert command with update. External program read data from one table and in every 30 min I need to refresh data in arhive table.
What I want is: if data already inserted and end_date is not changed, only to update lastseen column. If data not exists to insert data and if data exists and end_date is changed
to update end_date, lastseen and sendto columns. Well, update probably will never happened, this functionality is left for frontend but its can be cut off.

Seems like an insert on conflict would be simpler.  Otherwise, what is your question or concern?

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