By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,918 Members | 1,557 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,918 IT Pros & Developers. It's quick & easy.

Nonrepeatable Read and Phantom Read possible?

P: 1

I'm using postgreSQL 9.3 and I have the following two types of stored procedures (only the statements given):

Expand|Select|Wrap|Line Numbers
  1. INSERT INTO table1 (col1, col2, col3, col4, col5) 
  2. SELECT $1, $2, $3, $4, $5
Expand|Select|Wrap|Line Numbers
  1. DELETE FROM table1 m WHERE = (
  2.     SELECT FROM table1 m 
  3.     WHERE   m.col1 = $1 
  4.     AND     coalesce($2, m.col2) = m.col2
  5.     AND     coalesce(m.col3, $3) = $3 
  6.     ORDER BY ASC 
  7.     LIMIT 1
  8.     FOR UPDATE
  9. ) RETURNING, m.col1, m.col2, m.col3, m.col4, m.col5, m.col6;
The $x represents input to the stored procedures. I ommited the function declaration.

Is Nonrepeatable Read and Phantom Read possible with this two stored procedures?
Oct 18 '14 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.