V
V
vdsp2017-05-05 11:49:12
PostgreSQL
vdsp, 2017-05-05 11:49:12

postgresql copy update how?

There is a copy command that inserts data into tables from a file. Is there any analogue not for inserting, but for changing a record? Whether it is possible for example to use the trigger on insert for the temporary table in which there will be a check on existence of record on PK and to make update - how you think it is how effective? Is there something like insert .. on conflict update for the copy command?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2017-05-05
@vdsp

Drive into a temporary table, and then use it to update the main table.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question