Transaction Questions
От | |
---|---|
Тема | Transaction Questions |
Дата | |
Msg-id | B74B7433CDDD2C4AA41D94832E32E19D92EE8C@EMEXM1112.dir.svc.accenture.com обсуждение исходный текст |
Ответы |
Re: Transaction Questions
Re: Transaction Questions |
Список | pgsql-novice |
Hi, Following on from my last question, I'm attempting to write a function that inserts periods. Periods are either bookings,available, or unavailable, each stored in a seperate table, and all have start date and end date columns, all ofwhich inherit a table 'calendar_entries'. The function needs to check that there are no overlapping periods, so I need to check all three tables - I need to prevententries being added in parrell for the duration of the function. My question is - Is it sufficient to LOCK calendar_entriesIN EXCLUSIVE MODE, or do I need to lock all three tables individually? Also, inside the function I need to use a transaction in order to DELETE one row, and UPDATE another. Will this 'inner' transactionhave write access to all 3 tables? Just trying to get my head around concurrency - Have a good weekend! Ta, Neil. This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other useof the email by you is prohibited.
В списке pgsql-novice по дате отправления: