Insert records in the tavke only if they are not exist - Mailing list pgsql-general

From Igor Korot
Subject Insert records in the tavke only if they are not exist
Date
Msg-id CA+FnnTwcNNGsM_ck0ye1OsUN3Jjg94PzGMKRm--2ojJM_zVOMA@mail.gmail.com
Whole thread Raw
Responses Re: Insert records in the tavke only if they are not exist
Re: Insert records in the tavke only if they are not exist
List 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 by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: tds_fdw DB-Library error: DB #: 20002, DB Msg: Adaptive Server connection failed
Next
From: "David G. Johnston"
Date:
Subject: Re: Insert records in the tavke only if they are not exist