On 23-01-2021 23:29, Melvin Davidson wrote:
Maybe this example will help.
From https://www.postgresql.org/docs/current/sql-insert.html
INSERT INTO distributors AS d (did, dname) VALUES (8, 'Anvil
Distribution')
ON CONFLICT (did) DO UPDATE
SET dname = EXCLUDED.dname || ' (formerly ' || d.
Maybe this example will help.
>From https://www.postgresql.org/docs/current/sql-insert.html
INSERT INTO distributors AS d (did, dname) VALUES (8, 'Anvil Distribution')
ON CONFLICT (did) DO UPDATE
SET dname = EXCLUDED.dname || ' (formerly ' || d.dname || ')'
WHERE d.zipcode <> '21201';
On 1/23/21 12:14 PM, Condor wrote:
On 23-01-2021 20:49, Adrian Klaver wrote:
On 1/23/21 10:20 AM, Condor wrote:
Sorry,
I'm sorry, I don't understand something. You mean to do pure INSERT ON
CONFLICT DO or to modify the trigger ?
No I meant that in the external program you use to fetch th
On 23-01-2021 20:49, Adrian Klaver wrote:
On 1/23/21 10:20 AM, Condor wrote:
On 23-01-2021 18:31, Adrian Klaver wrote:
On 1/23/21 4:57 AM, Condor wrote:
So do an UPDATE and the RETURN NULL to cancel the INSERT. Untested
example:
UPDATE arhive_table SET sendto = 0, uts = date_part('epo
On 1/23/21 10:20 AM, Condor wrote:
On 23-01-2021 18:31, Adrian Klaver wrote:
On 1/23/21 4:57 AM, Condor wrote:
So do an UPDATE and the RETURN NULL to cancel the INSERT. Untested
example:
UPDATE arhive_table SET sendto = 0, uts = date_part('epoch',
CURRENT_TIMESTAMP)::integer WHERE cont
On 23-01-2021 18:31, Adrian Klaver wrote:
On 1/23/21 4:57 AM, Condor 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 is the table being read
On 23-01-2021 18:17, David G. Johnston wrote:
On Saturday, January 23, 2021, Condor 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
On 1/23/21 4:57 AM, Condor 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 is the table being read from and is it in the same database?
See
On Saturday, January 23, 2021, Condor 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 alrea
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
10 matches
Mail list logo