Odd query execution behavior with extended protocol
От | Shay Rojansky |
---|---|
Тема | Odd query execution behavior with extended protocol |
Дата | |
Msg-id | CADT4RqDX5eTfayzCvDpjy179vW4=dy-wWZbbuJVa4JzSixCriw@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: Odd query execution behavior with extended protocol
Re: Odd query execution behavior with extended protocol |
Список | pgsql-hackers |
<div dir="ltr"><div style="font-size:12.8px">Hi hackers, some odd behavior has been reported with Npgsql and I'm sure youcan help.</div><div style="font-size:12.8px"><br /></div><div style="font-size:12.8px">Npgsql supports sending multipleSQL statements in a single packet via the extended protocol. This works fine, but when the second query SELECTs avalue modified by the first's UPDATE, I'm getting a result as if the UPDATE hasn't yet occurred.</div><div style="font-size:12.8px"><br/></div><div style="font-size:12.8px">The exact messages send by Npgsql are:</div><div style="font-size:12.8px"><br/></div><div style="font-size:12.8px">Parse (UPDATE data SET name='foo' WHERE id=1), statement=unnamed</div><divstyle="font-size:12.8px">Describe (statement=unnamed)</div><div style="font-size:12.8px">Bind(statement=unnamed, portal=MQ0)</div><div style="font-size:12.8px">Parse (SELECT * FROM dataWHERE id=1), statement=unnamed</div><div style="font-size:12.8px">Describe (statement=unnamed)</div><div style="font-size:12.8px">Bind(statement=unnamed, portal=MQ1)</div><div style="font-size:12.8px">Execute (portal=MQ0)</div><divstyle="font-size:12.8px">Close (portal=MQ0)</div><div style="font-size:12.8px">Execute (portal=MQ1)</div><divstyle="font-size:12.8px">Close (portal=MQ1)</div><div style="font-size:12.8px">Sync</div><div style="font-size:12.8px"><br/></div><div style="font-size:12.8px">Instead of returning the expected 'foo' value set in thefirst command's UPDATE, I'm getting whatever value was previously there.</div><div style="font-size:12.8px">Note thatthis happen regardless of whether a transaction is already set and of the isolation level.</div><div style="font-size:12.8px"><br/></div><div style="font-size:12.8px">Is this the expected behavior, have I misunderstood theprotocol specs?</div><div style="font-size:12.8px"><br /></div><div style="font-size:12.8px">Thanks for your help, andplease let me know if you need any more info.</div><div style="font-size:12.8px"><br /></div><div style="font-size:12.8px">Shay</div></div>
В списке pgsql-hackers по дате отправления: