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

From Adrian Klaver
Subject Re: Insert records in the tavke only if they are not exist
Date
Msg-id 8770b693-0c44-40de-b883-36cc5e718a0a@aklaver.com
Whole thread Raw
In response to Insert records in the tavke only if they are not exist  (Igor Korot <ikorot01@gmail.com>)
Responses Re: Insert records in the tavke only if they are not exist
List pgsql-general
On 12/6/24 19:36, Igor Korot wrote:
> 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.

Does this also apply to starts after the second time?

Is the data expected to change over time?

> 
> Everything is good, except what if I have a connection from 2 different 
> users?
Is it possible to have the app start up without external users connecting?

> 
> 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.
> 

-- 
Adrian Klaver
adrian.klaver@aklaver.com




pgsql-general by date:

Previous
From: Igor Korot
Date:
Subject: Re: Insert records in the tavke only if they are not exist
Next
From: Igor Korot
Date:
Subject: Re: Insert records in the tavke only if they are not exist