Insert records in the tavke only if they are not exist

Поиск
Список
Период
Сортировка
От Igor Korot
Тема Insert records in the tavke only if they are not exist
Дата
Msg-id CA+FnnTwcNNGsM_ck0ye1OsUN3Jjg94PzGMKRm--2ojJM_zVOMA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Insert records in the tavke only if they are not exist
Re: Insert records in the tavke only if they are not exist
Список pgsql-general
Hi, All,

When my application starts up, ot creates some tables and insert records in them.

When the app starts for the second time it should check if the tables and the records in them are exist and skip the process.

Everything is good, except what if I have a connection from 2 different users?

I can run this inside transaction, but will this be enough? Will stating transaction lock the DB and the second user will wait for transaction to complete?

Thank you.

В списке pgsql-general по дате отправления: