Обсуждение: ROLLBACK syntax error in pgadmin4

Поиск
Список
Период
Сортировка

ROLLBACK syntax error in pgadmin4

От
Malik Rumi
Дата:
<div dir="ltr">I am using PGAdmin4 with PG 9.4 on Ubuntu 16.04 64 bit. I wanted to do an update, but was unsure of the
result,so I unselected autocommit and ran explain. It said only one row was affected, which I didn’t understand,
becauseit should have affected at least 2. Then I inferred that the ‘one row’ being referred to was the plan, not the
rowsin my data. <p class="gmail-western" style="margin-bottom:0in;line-height:100%"><p class="gmail-western"
style="margin-bottom:0in;line-height:100%">ThenI ran the update, again no autocommit, and it was not what I expected.
Sothen I added ROLLBACK to the end of the query, ran it again, and got this error:<p class="gmail-western"
style="margin-bottom:0in;line-height:100%;margin-left:40px">ERROR:syntax error at or near "ROLLBACK" LINE 1: ...de" SET
childof_id= NULL WHERE codelevelsortseq=1 ROLLBACK;<p class="gmail-western"
style="margin-bottom:0in;line-height:100%">Ithen did a new query, with just ROLLBACK; as I see it explained with an
examplein the docs: <a
href="https://www.postgresql.org/docs/9.4/static/sql-rollback.html">https://www.postgresql.org/docs/9.4/static/sql-rollback.html</a><p
class="gmail-western"style="margin-bottom:0in;line-height:100%">Nevertheless, I got the same error:<p
class="gmail-western"style="margin-bottom:0in;line-height:100%;margin-left:40px">ERROR: syntax error at or near
"ROLLBACK"LINE 1: ...F, VERBOSE ON, COSTS ON, BUFFERS OFF, TIMING OFF) ROLLBACK;<br />Note in this case ROLLBACK; is
theonly thing on Line 1. The error carat (^) is pointing at the R in both cases. No other queries have been run in the
interim.<p class="gmail-western" style="margin-bottom:0in;line-height:100%">To my surprise, there are very few Google
hitsfor this exact search: <p class="gmail-western" style="margin-bottom:0in;line-height:100%;margin-left:40px">"syntax
errorat or near 'ROLLBACK'" About 30 results (0.34 seconds) <p class="gmail-western"
style="margin-bottom:0in;line-height:100%">Thefirst two hits are for a bug report from Nov. of 2006, which was fixed
thenand there. I don’t think this is the same bug, if it is a bug. <p class="gmail-western"
style="margin-bottom:0in;line-height:100%">Idid find DISCARD in the docs: <a
href="https://www.postgresql.org/docs/9.4/static/sql-discard.html">https://www.postgresql.org/docs/9.4/static/sql-discard.html</a>
however,I have not run it because I wanted some clarity here and didn’t want to interfere with my ROLLBACK, if it would
evenhave that effect.<p class="gmail-western" style="margin-bottom:0in;line-height:100%">So, my questions:<p
class="gmail-western"style="margin-bottom:0in;line-height:100%">1. How do I discard this update and get my data back?<p
class="gmail-western"style="margin-bottom:0in;line-height:100%">2. How do I check to make sure it really isn’t
committedwithout upsetting my ROLLBACK options? (Yes, I do have a backup I can go to, but I would rather understand
whatis happening and fix it).<p class="gmail-western" style="margin-bottom:0in;line-height:100%">4. If it isn’t
committed,and this is a bug, can I just close PGAdmin4 and/or PG and discard the changes that way?<p
class="gmail-western"style="margin-bottom:0in;line-height:100%">5. Is this a new, different bug?<p
class="gmail-western"style="margin-bottom:0in;line-height:100%">6. What was that 'one row effected' about?<br /></div> 

Re: ROLLBACK syntax error in pgadmin4

От
Melvin Davidson
Дата:
<div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace,
sans-serif;font-size:16px"><divid="yui_3_16_0_1_1480442930679_8438"><b>The problem is, ROLLBACK requires a transaction.
Soto use it properly you need to <br /></b></div><div dir="ltr" id="yui_3_16_0_1_1480442930679_8400"><b>start with a
BEGINstatement.</b></div><div id="yui_3_16_0_1_1480442930679_8439"><b><br /></b></div><div
id="yui_3_16_0_1_1480442930679_8387"><b>eg:</b></div><divid="yui_3_16_0_1_1480442930679_8399"><b><br /></b></div><div
id="yui_3_16_0_1_1480442930679_8375"><b>BEGIN;</b></div><divid="yui_3_16_0_1_1480442930679_8347"><b
id="yui_3_16_0_1_1480442930679_8847">your_statements;</b></div><divid="yui_3_16_0_1_1480442930679_8363"><b>ROLLBACK;<br
/></b></div><divid="yui_3_16_0_1_1480442930679_8313"><b><span><br /></span></b></div><div
id="yui_3_16_0_1_1480442930679_8630"><bid="yui_3_16_0_1_1480442930679_8848"><a class="edited-link-editor"
href="https://www.postgresql.org/docs/9.4/static/sql-begin.html"
id="yui_3_16_0_1_1480442930679_8631">https://www.postgresql.org/docs/9.4/static/sql-begin.html<br/></a></b></div><div
id="yui_3_16_0_1_1480442930679_8629"><b><br/></b></div><div id="yui_3_16_0_1_1480442930679_8850"><b
id="yui_3_16_0_1_1480442930679_8849"><aclass="edited-link-editor"
href="https://www.postgresql.org/docs/9.4/static/sql-rollback.html"
id="yui_3_16_0_1_1480442930679_8786">https://www.postgresql.org/docs/9.4/static/sql-rollback.html</a></b></div><div
dir="ltr"id="yui_3_16_0_1_1480442930679_8851"><b><a class="edited-link-editor"
href="https://www.postgresql.org/docs/9.4/static/sql-rollback.html"id="yui_3_16_0_1_1480442930679_8786"><br
/></a></b></div><divid="yui_3_16_0_1_1480442930679_8314"><div dir="ltr" id="yui_3_16_0_1_1480442930679_8853"><b
id="yui_3_16_0_1_1480442930679_8852">fyi,in the future, it is always a good idea to include the PostgreSQL
version.</b></div><divdir="ltr" id="yui_3_16_0_1_1480442930679_8854"><b><br /></b></div></div><div class="signature"
id="yui_3_16_0_1_1480442930679_8318"><divid="RTEContent"><font id="yui_3_16_0_1_1480442930679_8502" size="4"><span
id="yui_3_16_0_1_1480442930679_8501"style="font-weight:bold;font-family:arial;color:rgb(0, 0, 255);">Melvin Davidson
</span></font><br/><font id="yui_3_16_0_1_1480442930679_8671" size="3">     Cell 720-320-0155 <br /></font><font
id="yui_3_16_0_1_1480442930679_8441"size="3" style="font-weight:bold;"><span id="yui_3_16_0_1_1480442930679_8440"
style="color:rgb(128,0, 255);">I reserve the right to fantasize.  Whether or not you </span><br style="color:rgb(128,
0,255);" /><span id="yui_3_16_0_1_1480442930679_8457" style="color:rgb(128, 0, 255);">wish to share my fantasy is
entirelyup to you. </span><img data-id="2504534e-ab70-de15-417b-22733bd23caa"
src="http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/01.gif"style="color:rgb(128, 0, 255);" /><br /></font><font
id="yui_3_16_0_ym19_1_1467319472979_3360"size="3" style="font-weight:bold;">www.youtube.com/unusedhero/videos<br
/></font><fontid="yui_3_16_0_1_1480442930679_8670" size="3"><span id="yui_3_16_0_1_1480442930679_8669"
style="font-weight:bold;font-family:courier;">FolkAlley - All Folk - 24 Hours a day </span><span
id="yui_3_16_0_1_1480442930679_8673"style="font-weight:bold;font-family:courier;"><br />www.folkalley.com<br /><br
/></span></font></div></div><divclass="qtdSeparateBR" id="yui_3_16_0_1_1480442930679_8442"><br /><br /></div><div
class="yahoo_quoted"id="yui_3_16_0_1_1480442930679_8446" style="display: block;"><div
id="yui_3_16_0_1_1480442930679_8445"style="font-family: Courier New, courier, monaco, monospace, sans-serif; font-size:
16px;"><divid="yui_3_16_0_1_1480442930679_8444" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial,
LucidaGrande, sans-serif; font-size: 16px;"><div dir="ltr" id="yui_3_16_0_1_1480442930679_8503"><font face="Arial"
id="yui_3_16_0_1_1480442930679_8674"size="2"><hr size="1" /><b><span style="font-weight:bold;">From:</span></b> Malik
Rumi<malik.a.rumi@gmail.com><br /><b><span style="font-weight: bold;">To:</span></b> pgAdmin Support
<pgadmin-support@postgresql.org><br /><b><span style="font-weight: bold;">Sent:</span></b> Tuesday, November 29,
20161:17 PM<br /><b><span style="font-weight: bold;">Subject:</span></b> [pgadmin-support] ROLLBACK syntax error in
pgadmin4<br/></font></div><div class="y_msg_container" id="yui_3_16_0_1_1480442930679_8443"><br /><div
id="yiv6295819857"><divdir="ltr" id="yui_3_16_0_1_1480442930679_8447">I am using PGAdmin4 with PG 9.4 on Ubuntu 16.04
64bit. I wanted to do an update, but was unsure of the result, so I unselected autocommit and ran explain. It said only
onerow was affected, which I didn’t understand, because it should have affected at least 2. Then I inferred that the
‘onerow’ being referred to was the plan, not the rows in my data. <div class="yiv6295819857gmail-western"
style="margin-bottom:0in;line-height:100%;"></div><divclass="yiv6295819857gmail-western"
id="yui_3_16_0_1_1480442930679_8448"style="margin-bottom:0in;line-height:100%;">Then I ran the update, again no
autocommit,and it was not what I expected. So then I added ROLLBACK to the end of the query, ran it again, and got this
error:</div><divclass="yiv6295819857gmail-western" id="yui_3_16_0_1_1480442930679_8449"
style="margin-bottom:0in;line-height:100%;margin-left:40px;">ERROR:syntax error at or near "ROLLBACK" LINE 1: ...de"
SETchildof_id = NULL WHERE codelevelsortseq=1 ROLLBACK;</div><div class="yiv6295819857gmail-western"
style="margin-bottom:0in;line-height:100%;">Ithen did a new query, with just ROLLBACK; as I see it explained with an
examplein the docs: <a href="https://www.postgresql.org/docs/9.4/static/sql-rollback.html" rel="nofollow"
target="_blank">https://www.postgresql.org/docs/9.4/static/sql-rollback.html</a></div><div
class="yiv6295819857gmail-western"id="yui_3_16_0_1_1480442930679_8451"
style="margin-bottom:0in;line-height:100%;">Nevertheless,I got the same error:</div><div
class="yiv6295819857gmail-western"style="margin-bottom:0in;line-height:100%;margin-left:40px;">ERROR: syntax error at
ornear "ROLLBACK" LINE 1: ...F, VERBOSE ON, COSTS ON, BUFFERS OFF, TIMING OFF) ROLLBACK;</div><br />Note in this case
ROLLBACK;is the only thing on Line 1. The error carat (^) is pointing at the R in both cases. No other queries have
beenrun in the interim. <div class="yiv6295819857gmail-western" id="yui_3_16_0_1_1480442930679_8455"
style="margin-bottom:0in;line-height:100%;">Tomy surprise, there are very few Google hits for this exact search:
</div><divclass="yiv6295819857gmail-western" style="margin-bottom:0in;line-height:100%;margin-left:40px;">"syntax error
ator near 'ROLLBACK'" About 30 results (0.34 seconds) </div><div class="yiv6295819857gmail-western"
style="margin-bottom:0in;line-height:100%;">Thefirst two hits are for a bug report from Nov. of 2006, which was fixed
thenand there. I don’t think this is the same bug, if it is a bug. </div><div class="yiv6295819857gmail-western"
id="yui_3_16_0_1_1480442930679_8453"style="margin-bottom:0in;line-height:100%;">I did find DISCARD in the docs: <a
href="https://www.postgresql.org/docs/9.4/static/sql-discard.html"rel="nofollow"
target="_blank">https://www.postgresql.org/docs/9.4/static/sql-discard.html</a>however, I have not run it because I
wantedsome clarity here and didn’t want to interfere with my ROLLBACK, if it would even have that effect.</div><div
class="yiv6295819857gmail-western"style="margin-bottom:0in;line-height:100%;">So, my questions:</div><div
class="yiv6295819857gmail-western"style="margin-bottom:0in;line-height:100%;">1. How do I discard this update and get
mydata back?</div><div class="yiv6295819857gmail-western" style="margin-bottom:0in;line-height:100%;">2. How do I check
tomake sure it really isn’t committed without upsetting my ROLLBACK options? (Yes, I do have a backup I can go to, but
Iwould rather understand what is happening and fix it).</div><div class="yiv6295819857gmail-western"
style="margin-bottom:0in;line-height:100%;">4.If it isn’t committed, and this is a bug, can I just close PGAdmin4
and/orPG and discard the changes that way?</div><div class="yiv6295819857gmail-western"
style="margin-bottom:0in;line-height:100%;">5.Is this a new, different bug?</div><div
class="yiv6295819857gmail-western"style="margin-bottom:0in;line-height:100%;">6. What was that 'one row effected'
about?<br/></div></div></div><br /><br /></div></div></div></div></div> 

Re: ROLLBACK syntax error in pgadmin4

От
Malik Rumi
Дата:
Thank you. However...

ERROR: current transaction is aborted, commands ignored until end of transaction block

I'm not even sure what this means. Which transaction is it referring to? The rollback or the update?
What is the error and how do I fix it? What is meant by "until end of transaction block"? Does that mean the entire transaction block, or that something might happen after the end of this block?

I did some more googling, and found this from the postgresql list:
If that's what you're getting, the problem was with an earlier command 
that returned an error you didn't notice, not with the command you just 
ran. https://www.postgresql.org/message-id/4CAB085C.5030106@postnewspapers.com.au 
I suppose that makes sense and applies here, since I came here asking about two consecutive syntax errors in the first place. But I still don't know how to safely back out of this situation. Any further advice? Anyone?

p.s. - I said I had PG 9.4. I assumed everyone would know that meant Postgresql 9.4

On Tue, Nov 29, 2016 at 10:24 AM, Melvin Davidson <melvin6925@yahoo.com> wrote:
The problem is, ROLLBACK requires a transaction. So to use it properly you need to
start with a BEGIN statement.

eg:

BEGIN;
your_statements;
ROLLBACK;



fyi, in the future, it is always a good idea to include the PostgreSQL version.

Melvin Davidson
    Cell 720-320-0155
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.
www.youtube.com/unusedhero/videos
Folk Alley - All Folk - 24 Hours a day
www.folkalley.com




From: Malik Rumi <malik.a.rumi@gmail.com>
To: pgAdmin Support <pgadmin-support@postgresql.org>
Sent: Tuesday, November 29, 2016 1:17 PM
Subject: [pgadmin-support] ROLLBACK syntax error in pgadmin4

I am using PGAdmin4 with PG 9.4 on Ubuntu 16.04 64 bit. I wanted to do an update, but was unsure of the result, so I unselected autocommit and ran explain. It said only one row was affected, which I didn’t understand, because it should have affected at least 2. Then I inferred that the ‘one row’ being referred to was the plan, not the rows in my data.
Then I ran the update, again no autocommit, and it was not what I expected. So then I added ROLLBACK to the end of the query, ran it again, and got this error:
ERROR: syntax error at or near "ROLLBACK" LINE 1: ...de" SET childof_id = NULL WHERE codelevelsortseq=1 ROLLBACK;
I then did a new query, with just ROLLBACK; as I see it explained with an example in the docs: https://www.postgresql.org/docs/9.4/static/sql-rollback.html
Nevertheless, I got the same error:
ERROR: syntax error at or near "ROLLBACK" LINE 1: ...F, VERBOSE ON, COSTS ON, BUFFERS OFF, TIMING OFF) ROLLBACK;

Note in this case ROLLBACK; is the only thing on Line 1. The error carat (^) is pointing at the R in both cases. No other queries have been run in the interim.
To my surprise, there are very few Google hits for this exact search:
"syntax error at or near 'ROLLBACK'" About 30 results (0.34 seconds)
The first two hits are for a bug report from Nov. of 2006, which was fixed then and there. I don’t think this is the same bug, if it is a bug.
I did find DISCARD in the docs: https://www.postgresql.org/docs/9.4/static/sql-discard.html however, I have not run it because I wanted some clarity here and didn’t want to interfere with my ROLLBACK, if it would even have that effect.
So, my questions:
1. How do I discard this update and get my data back?
2. How do I check to make sure it really isn’t committed without upsetting my ROLLBACK options? (Yes, I do have a backup I can go to, but I would rather understand what is happening and fix it).
4. If it isn’t committed, and this is a bug, can I just close PGAdmin4 and/or PG and discard the changes that way?
5. Is this a new, different bug?
6. What was that 'one row effected' about?



Re: ROLLBACK syntax error in pgadmin4

От
Melvin Davidson
Дата:
<div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace,
sans-serif;font-size:16px"><divid="yui_3_16_0_1_1480447941789_21878"><b>Malik,</b></div><div
id="yui_3_16_0_1_1480447941789_21877"><b><br/></b></div><div id="yui_3_16_0_1_1480447941789_21936"><b
id="yui_3_16_0_1_1480447941789_22068">Firstthings first.</b></div><div id="yui_3_16_0_1_1480447941789_21876"><b
id="yui_3_16_0_1_1480447941789_22067">1.This is not the correct forum for this problem.</b></div><div
id="yui_3_16_0_1_1480447941789_21811"><b><br/></b></div><div dir="ltr" id="yui_3_16_0_1_1480447941789_21812"><b
id="yui_3_16_0_1_1480447941789_22663">PgAdminis a utility for managing PostgreSQL.</b></div><div dir="ltr"
id="yui_3_16_0_1_1480447941789_21937"><b><br/></b></div><div dir="ltr" id="yui_3_16_0_1_1480447941789_21938"><b
id="yui_3_16_0_1_1480447941789_22066">Youare better off re-submitting this problem to pgsql-general</b><wbr
id="yui_3_16_0_1_1480447941789_21944"/><b id="yui_3_16_0_1_1480447941789_22417">@postgresql.org</b></div><div dir="ltr"
id="yui_3_16_0_1_1480447941789_21991"><bid="yui_3_16_0_1_1480447941789_22065">but you stand a better chance if you also
include</b></div><divdir="ltr" id="yui_3_16_0_1_1480447941789_21992"><b id="yui_3_16_0_1_1480447941789_22416">A.
O/S</b></div><divdir="ltr" id="yui_3_16_0_1_1480447941789_22022"><b id="yui_3_16_0_1_1480447941789_22418">B. <font
color="#cd232c"id="yui_3_16_0_1_1480447941789_22569">Exact version of PostgreSQL</font></b></div><div dir="ltr"
id="yui_3_16_0_1_1480447941789_22109"><bid="yui_3_16_0_1_1480447941789_22112">C. <font color="#cd232c">SQL code to
reproducethe problem.</font><br /></b></div><div id="yui_3_16_0_1_1480447941789_21765"><span><br /></span></div><div
dir="ltr"id="yui_3_16_0_1_1480447941789_22211"><b id="yui_3_16_0_1_1480447941789_22328"><span
id="yui_3_16_0_1_1480447941789_22208">Asfor "</span>ERROR: current transaction is aborted, commands ignored until end
oftransaction block"</b></div><div dir="ltr" id="yui_3_16_0_1_1480447941789_22212"><b
id="yui_3_16_0_1_1480447941789_22327">Itmeans all commands from BEGIN; until the error occurs are rolled back. No
furthercommands</b></div><div dir="ltr" id="yui_3_16_0_1_1480447941789_22301"><b
id="yui_3_16_0_1_1480447941789_22662">afterthe error occurs are executed.<br /></b></div><div
id="yui_3_16_0_1_1480447941789_21760"> </div><divclass="signature" id="yui_3_16_0_1_1480447941789_21751"><div
id="RTEContent"><fontsize="4"><span style="font-weight:bold;font-family:arial;color:rgb(0, 0, 255);">Melvin Davidson
</span></font><br/><font id="yui_3_16_0_1_1480447941789_21750" size="3" style="font-weight:bold;"><span
id="yui_3_16_0_1_1480447941789_21759"style="color:rgb(128, 0, 255);">I reserve the right to fantasize.  Whether or not
you</span><br style="color:rgb(128, 0, 255);" /><span id="yui_3_16_0_1_1480447941789_21749" style="color:rgb(128, 0,
255);">wishto share my fantasy is entirely up to you. </span><img data-id="4fec765a-8f8b-58d7-65bf-334e4ce665d7"
src="http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/01.gif"style="color:rgb(128, 0, 255);" /><br /></font><font
id="yui_3_16_0_ym19_1_1467319472979_3360"size="3" style="font-weight:bold;">www.youtube.com/unusedhero/videos<br
/></font><fontid="yui_3_16_0_1_1480447941789_21758" size="3"><span id="yui_3_16_0_1_1480447941789_21757"
style="font-weight:bold;font-family:courier;">FolkAlley - All Folk - 24 Hours a day </span><span
id="yui_3_16_0_1_1480447941789_22621"style="font-weight:bold;font-family:courier;"><br />www.folkalley.com<br /><br
/></span></font></div></div><divclass="qtdSeparateBR" id="yui_3_16_0_1_1480447941789_22107"><br /><br /></div><div
class="yahoo_quoted"id="yui_3_16_0_1_1480447941789_22103" style="display: block;"><div
id="yui_3_16_0_1_1480447941789_22102"style="font-family: Courier New, courier, monaco, monospace, sans-serif;
font-size:16px;"><div id="yui_3_16_0_1_1480447941789_22101" style="font-family: HelveticaNeue, Helvetica Neue,
Helvetica,Arial, Lucida Grande, sans-serif; font-size: 16px;"><div dir="ltr"
id="yui_3_16_0_1_1480447941789_22194"><fontface="Arial" id="yui_3_16_0_1_1480447941789_22624" size="2"><hr
id="yui_3_16_0_1_1480447941789_22623"size="1" /><b><span style="font-weight:bold;">From:</span></b> Malik Rumi
<malik.a.rumi@gmail.com><br/><b><span style="font-weight: bold;">To:</span></b> Melvin Davidson
<melvin6925@yahoo.com><br /><b><span style="font-weight: bold;">Cc:</span></b> pgAdmin Support
<pgadmin-support@postgresql.org><br/><b><span style="font-weight: bold;">Sent:</span></b> Tuesday, November 29,
20162:50 PM<br /><b><span style="font-weight: bold;">Subject:</span></b> Re: [pgadmin-support] ROLLBACK syntax error in
pgadmin4<br/></font></div><div class="y_msg_container" id="yui_3_16_0_1_1480447941789_22100"><br /><div
id="yiv2305844011"><divid="yui_3_16_0_1_1480447941789_22099"><div dir="ltr" id="yui_3_16_0_1_1480447941789_22098"><div
id="yui_3_16_0_1_1480447941789_22097"><divid="yui_3_16_0_1_1480447941789_22096"><div
id="yui_3_16_0_1_1480447941789_22095">Thankyou. However...<br clear="none" /><br clear="none" /><div
id="yui_3_16_0_1_1480447941789_22094"style="margin-left:40px;">ERROR: current transaction is aborted, commands ignored
untilend of transaction block<br clear="none" /></div><br clear="none" /></div>I'm not even sure what this means. Which
transactionis it referring to? The rollback or the update?<br clear="none" /></div>What is the error and how do I fix
it?What is meant by "<i><u>until</u></i> end of transaction block"? Does that mean the entire transaction block, or
thatsomething might happen after the end of this block?<br clear="none" /><br clear="none" /></div><div
id="yui_3_16_0_1_1480447941789_22104">Idid some more googling, and found this from the postgresql list:<br clear="none"
/><preid="yui_3_16_0_1_1480447941789_22139" style="margin-left:40px;">If that's what you're getting, the problem was
withan earlier command  
that returned an error you didn't notice, not with the command you just
ran. <a href="https://www.postgresql.org/message-id/4CAB085C.5030106@postnewspapers.com.au"
id="yui_3_16_0_1_1480447941789_22140"rel="nofollow" shape="rect"
target="_blank">https://www.postgresql.org/message-id/4CAB085C.5030106@postnewspapers.com.au</a></pre>I suppose that
makessense and applies here, since I came here asking about two consecutive syntax errors in the first place. But I
stilldon't know how to safely back out of this situation. Any further advice? Anyone?<br clear="none" /></div><div
id="yui_3_16_0_1_1480447941789_22145"><brclear="none" /></div>p.s. - I said I had PG 9.4. I assumed everyone would know
thatmeant Postgresql 9.4<br clear="none" /></div><div class="yiv2305844011yqt1358800897"
id="yiv2305844011yqt78314"><divclass="yiv2305844011gmail_extra" id="yui_3_16_0_1_1480447941789_22146"><br clear="none"
/><divclass="yiv2305844011gmail_quote" id="yui_3_16_0_1_1480447941789_22149">On Tue, Nov 29, 2016 at 10:24 AM, Melvin
Davidson<span dir="ltr" id="yui_3_16_0_1_1480447941789_22148"><<a href="mailto:melvin6925@yahoo.com"
id="yui_3_16_0_1_1480447941789_22147"rel="nofollow" shape="rect" target="_blank"
ymailto="mailto:melvin6925@yahoo.com">melvin6925@yahoo.com</a>></span>wrote:<br clear="none" /><blockquote
class="yiv2305844011gmail_quote"id="yui_3_16_0_1_1480447941789_22153" style="margin:0 0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex;"><divid="yui_3_16_0_1_1480447941789_22152"><div id="yui_3_16_0_1_1480447941789_22151"
style="color:#000;background-color:#fff;font-family:CourierNew, courier, monaco, monospace,
sans-serif;font-size:16px;"><divid="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8438"><b
id="yui_3_16_0_1_1480447941789_22150">Theproblem is, ROLLBACK requires a transaction. So to use it properly you need to
<brclear="none" /></b></div><div dir="ltr"
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8400"><b>startwith a BEGIN statement.</b></div><div
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8439"><b><brclear="none" /></b></div><div
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8387"><b>eg:</b></div><div
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8399"><b><brclear="none" /></b></div><div
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8375"><b>BEGIN;</b></div><div
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8347"><b
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8847">your_statements;</b></div><div
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8363"><b>ROLLBACK;<brclear="none" /></b></div><div
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8313"><b><span><brclear="none" /></span></b></div><div
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8630"><b
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8848"><a
class="yiv2305844011m_5682970348618810673edited-link-editor"
href="https://www.postgresql.org/docs/9.4/static/sql-begin.html"
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8631"rel="nofollow" shape="rect"
target="_blank">https://www.postgresql.org/docs/9.4/static/sql-begin.html<br clear="none" /></a></b></div><div
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8629"><b><brclear="none" /></b></div><div
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8850"><b
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8849"><a
class="yiv2305844011m_5682970348618810673edited-link-editor"
href="https://www.postgresql.org/docs/9.4/static/sql-rollback.html"
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8786"rel="nofollow" shape="rect"
target="_blank">https://www.postgresql.org/docs/9.4/static/sql-rollback. html</a></b></div><div dir="ltr"
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8851"><b><a
class="yiv2305844011m_5682970348618810673edited-link-editor"
href="https://www.postgresql.org/docs/9.4/static/sql-rollback.html"
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8786"rel="nofollow" shape="rect" target="_blank"><br
clear="none"/></a></b></div><div id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8314"><div dir="ltr"
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8853"><b
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8852">fyi,in the future, it is always a good idea to
includethe PostgreSQL version.</b></div><div dir="ltr"
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8854"><b><brclear="none" /></b></div></div><div
class="yiv2305844011m_5682970348618810673signature"
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8318"><div
id="yiv2305844011m_5682970348618810673RTEContent"><font
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8502"size="4"><span
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8501"
style="font-weight:bold;font-family:arial;color:rgb(0,0,255);">MelvinDavidson </span></font><br clear="none" /><font
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8671"size="3"><br clear="none" /></font><font
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8441"size="3" style="font-weight:bold;"><span
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8440"style="color:rgb(128,0,255);">I reserve the right
tofantasize.  Whether or not you </span><br clear="none" style="color:rgb(128,0,255);" /><span
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8457"style="color:rgb(128,0,255);">wish to share my
fantasyis entirely up to you. </span><img data-id="2a3e9983-7850-4e47-54d4-4af9c0f91191"
src="http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/01.gif"style="color:rgb(128,0,255);" /><br clear="none"
/></font><fontid="yiv2305844011m_5682970348618810673yui_3_16_0_ym19_1_1467319472979_3360" size="3"
style="font-weight:bold;"><ahref="http://www.youtube.com/unusedhero/videos" id="yui_3_16_0_1_1480447941789_22647"
rel="nofollow"shape="rect" target="_blank">www.youtube.com/unusedhero/ videos</a><br clear="none" /></font><font
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8670"size="3"><span
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8669"
style="font-weight:bold;font-family:courier;">FolkAlley - All Folk - 24 Hours a day </span><span
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8673"style="font-weight:bold;font-family:courier;"><br
clear="none"/><a href="http://www.folkalley.com/" rel="nofollow" shape="rect" target="_blank">www.folkalley.com</a><br
clear="none"/><br clear="none" /></span></font></div></div><div class="yiv2305844011m_5682970348618810673qtdSeparateBR"
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8442"><brclear="none" /><br clear="none" /></div><div
class="yiv2305844011m_5682970348618810673yahoo_quoted"
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8446"style="display:block;"><div
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8445"style="font-family:Courier New, courier, monaco,
monospace,sans-serif;font-size:16px;"><div id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8444"
style="font-family:HelveticaNeue,Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"><div
dir="ltr"id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8503"><font face="Arial"
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8674"size="2"> </font><hr size="1" /><b><span
style="font-weight:bold;">From:</span></b>Malik Rumi <<a href="mailto:malik.a.rumi@gmail.com"
id="yui_3_16_0_1_1480447941789_22630"rel="nofollow" shape="rect" target="_blank"
ymailto="mailto:malik.a.rumi@gmail.com">malik.a.rumi@gmail.com</a>><brclear="none" /><b><span
style="font-weight:bold;">To:</span></b>pgAdmin Support <<a href="mailto:pgadmin-support@postgresql.org"
rel="nofollow"shape="rect" target="_blank" ymailto="mailto:pgadmin-support@postgresql.org">pgadmin-support@postgresql.
org</a>><br clear="none" /><b><span style="font-weight:bold;">Sent:</span></b> Tuesday, November 29, 2016 1:17 PM<br
clear="none"/><b><span style="font-weight:bold;">Subject:</span></b> [pgadmin-support] ROLLBACK syntax error in
pgadmin4<brclear="none" /></div><div id="yui_3_16_0_1_1480447941789_22718"><div class="yiv2305844011h5"
id="yui_3_16_0_1_1480447941789_22717"><divclass="yiv2305844011m_5682970348618810673y_msg_container"
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8443"><brclear="none" /><div
id="yiv2305844011m_5682970348618810673yiv6295819857"><divdir="ltr"
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8447">Iam using PGAdmin4 with PG 9.4 on Ubuntu 16.04
64bit. I wanted to do an update, but was unsure of the result, so I unselected autocommit and ran explain. It said only
onerow was affected, which I didn’t understand, because it should have affected at least 2. Then I inferred that the
‘onerow’ being referred to was the plan, not the rows in my data. <div
class="yiv2305844011m_5682970348618810673yiv6295819857gmail-western"
style="margin-bottom:0in;line-height:100%;"></div><div
class="yiv2305844011m_5682970348618810673yiv6295819857gmail-western"
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8448"style="margin-bottom:0in;line-height:100%;">Then
Iran the update, again no autocommit, and it was not what I expected. So then I added ROLLBACK to the end of the query,
ranit again, and got this error:</div><div class="yiv2305844011m_5682970348618810673yiv6295819857gmail-western"
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8449"
style="margin-bottom:0in;line-height:100%;margin-left:40px;">ERROR:syntax error at or near "ROLLBACK" LINE 1: ...de"
SETchildof_id = NULL WHERE codelevelsortseq=1 ROLLBACK;</div><div
class="yiv2305844011m_5682970348618810673yiv6295819857gmail-western"style="margin-bottom:0in;line-height:100%;">I then
dida new query, with just ROLLBACK; as I see it explained with an example in the docs: <a
href="https://www.postgresql.org/docs/9.4/static/sql-rollback.html"rel="nofollow" shape="rect"
target="_blank">https://www.postgresql.org/docs/9.4/static/sql-rollback. html</a></div><div
class="yiv2305844011m_5682970348618810673yiv6295819857gmail-western"
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8451"
style="margin-bottom:0in;line-height:100%;">Nevertheless,I got the same error:</div><div
class="yiv2305844011m_5682970348618810673yiv6295819857gmail-western"
style="margin-bottom:0in;line-height:100%;margin-left:40px;">ERROR:syntax error at or near "ROLLBACK" LINE 1: ...F,
VERBOSEON, COSTS ON, BUFFERS OFF, TIMING OFF) ROLLBACK;</div><br clear="none" />Note in this case ROLLBACK; is the only
thingon Line 1. The error carat (^) is pointing at the R in both cases. No other queries have been run in the interim.
<divclass="yiv2305844011m_5682970348618810673yiv6295819857gmail-western"
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8455"style="margin-bottom:0in;line-height:100%;">To my
surprise,there are very few Google hits for this exact search: </div><div
class="yiv2305844011m_5682970348618810673yiv6295819857gmail-western"
style="margin-bottom:0in;line-height:100%;margin-left:40px;">"syntaxerror at or near 'ROLLBACK'" About 30 results (0.34
seconds)</div><div class="yiv2305844011m_5682970348618810673yiv6295819857gmail-western"
style="margin-bottom:0in;line-height:100%;">Thefirst two hits are for a bug report from Nov. of 2006, which was fixed
thenand there. I don’t think this is the same bug, if it is a bug. </div><div
class="yiv2305844011m_5682970348618810673yiv6295819857gmail-western"
id="yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8453"style="margin-bottom:0in;line-height:100%;">I did
findDISCARD in the docs: <a href="https://www.postgresql.org/docs/9.4/static/sql-discard.html" rel="nofollow"
shape="rect"target="_blank">https://www.postgresql.org/ docs/9.4/static/sql-discard. html</a> however, I have not run
itbecause I wanted some clarity here and didn’t want to interfere with my ROLLBACK, if it would even have that
effect.</div><divclass="yiv2305844011m_5682970348618810673yiv6295819857gmail-western"
style="margin-bottom:0in;line-height:100%;">So,my questions:</div><div
class="yiv2305844011m_5682970348618810673yiv6295819857gmail-western"style="margin-bottom:0in;line-height:100%;">1. How
doI discard this update and get my data back?</div><div
class="yiv2305844011m_5682970348618810673yiv6295819857gmail-western"id="yui_3_16_0_1_1480447941789_22721"
style="margin-bottom:0in;line-height:100%;">2.How do I check to make sure it really isn’t committed without upsetting
myROLLBACK options? (Yes, I do have a backup I can go to, but I would rather understand what is happening and fix
it).</div><divclass="yiv2305844011m_5682970348618810673yiv6295819857gmail-western"
style="margin-bottom:0in;line-height:100%;">4.If it isn’t committed, and this is a bug, can I just close PGAdmin4
and/orPG and discard the changes that way?</div><div
class="yiv2305844011m_5682970348618810673yiv6295819857gmail-western"id="yui_3_16_0_1_1480447941789_22722"
style="margin-bottom:0in;line-height:100%;">5.Is this a new, different bug?</div><div
class="yiv2305844011m_5682970348618810673yiv6295819857gmail-western"id="yui_3_16_0_1_1480447941789_22724"
style="margin-bottom:0in;line-height:100%;">6.What was that 'one row effected' about?<br clear="none"
/></div></div></div><brclear="none" /><br clear="none"
/></div></div></div></div></div></div></div></div></blockquote></div><brclear="none" /></div></div></div></div><br
/><br/></div></div></div></div></div> 

Re: ROLLBACK syntax error in pgadmin4

От
Malik Rumi
Дата:
Ok, I am not trying to be difficult. I am trying to understand. If that sounds defensive, it's because of prior experience on Stack Overflow, where the "experts" tend to be snarky, IMHO.

I did all of this in PGAdmin4, so that is why I posted here. How would I determine what is a PGAdmin4 issue and what is not?

I did tell you my OS in the very first line of my very first post on this issue. I also told you my postgres version on that same line. When you say 'exact', do you mean 9.4.8, instead of just 9.4?

True enough, I did not give you the entire SQL, but I did give you the error, which quoted what I assumed were the relevant portions of the SQL. I'm sorry if that wasn't enough.

I gave you the background on what I had done to find a solution on my own. I also asked a lot of questions which I hoped would clarify my understanding of the problem, but they have not been addressed.

All in all, I thought I was being pretty verbose and specific. Maybe too much so. When you put together the lack of response to my specific questions, and asking for OS and PG version info I already gave, well, it's kinda discouraging. But it's a free service, and I assume you are a volunteer with a life and issues of your own. At least you responded, and fairly soon. A lot of people don't even get that.

I'm going to restart and hope for the best. I've learned that fsync is supposed to be on by default, so if the uncheck of autocommit did what it was supposed to do, I should be fine. If not, I have a backup. I just wanted to learn.

On Tue, Nov 29, 2016 at 12:59 PM, Melvin Davidson <melvin6925@yahoo.com> wrote:
Malik,

First things first.
1. This is not the correct forum for this problem.

PgAdmin is a utility for managing PostgreSQL.

You are better off re-submitting this problem to pgsql-general@postgresql.org
but you stand a better chance if you also include
A. O/S
B. Exact version of PostgreSQL
C. SQL code to reproduce the problem.

As for "ERROR: current transaction is aborted, commands ignored until end of transaction block"
It means all commands from BEGIN; until the error occurs are rolled back. No further commands
after the error occurs are executed.
 
Melvin Davidson
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.
www.youtube.com/unusedhero/videos
Folk Alley - All Folk - 24 Hours a day
www.folkalley.com




From: Malik Rumi <malik.a.rumi@gmail.com>
To: Melvin Davidson <melvin6925@yahoo.com>
Cc: pgAdmin Support <pgadmin-support@postgresql.org>
Sent: Tuesday, November 29, 2016 2:50 PM
Subject: Re: [pgadmin-support] ROLLBACK syntax error in pgadmin4

Thank you. However...

ERROR: current transaction is aborted, commands ignored until end of transaction block

I'm not even sure what this means. Which transaction is it referring to? The rollback or the update?
What is the error and how do I fix it? What is meant by "until end of transaction block"? Does that mean the entire transaction block, or that something might happen after the end of this block?

I did some more googling, and found this from the postgresql list:
If that's what you're getting, the problem was with an earlier command 
that returned an error you didn't notice, not with the command you just 
ran. https://www.postgresql.org/message-id/4CAB085C.5030106@postnewspapers.com.au 
I suppose that makes sense and applies here, since I came here asking about two consecutive syntax errors in the first place. But I still don't know how to safely back out of this situation. Any further advice? Anyone?

p.s. - I said I had PG 9.4. I assumed everyone would know that meant Postgresql 9.4

On Tue, Nov 29, 2016 at 10:24 AM, Melvin Davidson <melvin6925@yahoo.com> wrote:
The problem is, ROLLBACK requires a transaction. So to use it properly you need to
start with a BEGIN statement.

eg:

BEGIN;
your_statements;
ROLLBACK;



fyi, in the future, it is always a good idea to include the PostgreSQL version.

Melvin Davidson

I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.
www.youtube.com/unusedhero/ videos
Folk Alley - All Folk - 24 Hours a day
www.folkalley.com




From: Malik Rumi <malik.a.rumi@gmail.com>
To: pgAdmin Support <pgadmin-support@postgresql. org>
Sent: Tuesday, November 29, 2016 1:17 PM
Subject: [pgadmin-support] ROLLBACK syntax error in pgadmin4

I am using PGAdmin4 with PG 9.4 on Ubuntu 16.04 64 bit. I wanted to do an update, but was unsure of the result, so I unselected autocommit and ran explain. It said only one row was affected, which I didn’t understand, because it should have affected at least 2. Then I inferred that the ‘one row’ being referred to was the plan, not the rows in my data.
Then I ran the update, again no autocommit, and it was not what I expected. So then I added ROLLBACK to the end of the query, ran it again, and got this error:
ERROR: syntax error at or near "ROLLBACK" LINE 1: ...de" SET childof_id = NULL WHERE codelevelsortseq=1 ROLLBACK;
I then did a new query, with just ROLLBACK; as I see it explained with an example in the docs: https://www.postgresql.org/ docs/9.4/static/sql-rollback. html
Nevertheless, I got the same error:
ERROR: syntax error at or near "ROLLBACK" LINE 1: ...F, VERBOSE ON, COSTS ON, BUFFERS OFF, TIMING OFF) ROLLBACK;

Note in this case ROLLBACK; is the only thing on Line 1. The error carat (^) is pointing at the R in both cases. No other queries have been run in the interim.
To my surprise, there are very few Google hits for this exact search:
"syntax error at or near 'ROLLBACK'" About 30 results (0.34 seconds)
The first two hits are for a bug report from Nov. of 2006, which was fixed then and there. I don’t think this is the same bug, if it is a bug.
I did find DISCARD in the docs: https://www.postgresql.org/ docs/9.4/static/sql-discard. html however, I have not run it because I wanted some clarity here and didn’t want to interfere with my ROLLBACK, if it would even have that effect.
So, my questions:
1. How do I discard this update and get my data back?
2. How do I check to make sure it really isn’t committed without upsetting my ROLLBACK options? (Yes, I do have a backup I can go to, but I would rather understand what is happening and fix it).
4. If it isn’t committed, and this is a bug, can I just close PGAdmin4 and/or PG and discard the changes that way?
5. Is this a new, different bug?
6. What was that 'one row effected' about?






Re: ROLLBACK syntax error in pgadmin4

От
Melvin Davidson
Дата:
<div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace,
sans-serif;font-size:16px"><divid="yui_3_16_0_ym19_1_1480456117764_25736"><b>Malik,</b></div><div
id="yui_3_16_0_ym19_1_1480456117764_25737"><b><br/></b></div><div dir="ltr"
id="yui_3_16_0_ym19_1_1480456117764_25738"><bid="yui_3_16_0_ym19_1_1480456117764_26624">I was not blaming you for
postingto PgAdmin, I was just trying to advise you and direct you to the proper <br /></b></div><div dir="ltr"
id="yui_3_16_0_ym19_1_1480456117764_25878"><bid="yui_3_16_0_ym19_1_1480456117764_26399">forum. Please do not be so
defensive.As to determining whether it is a PgAdmin error or a PostgreSQL error, that is pretty simple. If a "feature"
ofPgAdmin is not working properly, then it is a PgAdmin error. But if you get a SQL error after running a SQL query,
thenit has to be PostgreSQL.<br /></b></div><div id="yui_3_16_0_ym19_1_1480456117764_25729"><b><span><br
/></span></b></div><divid="yui_3_16_0_ym19_1_1480456117764_26663"><b id="yui_3_16_0_ym19_1_1480456117764_26662"><span
id="yui_3_16_0_ym19_1_1480456117764_26661">Yes,you did give the O/S and PostgreSQL "major" version, but the minor
versionof PostgreSQL can be <br /></span></b></div><div dir="ltr" id="yui_3_16_0_ym19_1_1480456117764_26666"><b
id="yui_3_16_0_ym19_1_1480456117764_26665"><spanid="yui_3_16_0_ym19_1_1480456117764_26664">critical in some cases, as
theyminor versions contain fixes for bugs that may or may not have something <br /></span></b></div><div dir="ltr"
id="yui_3_16_0_ym19_1_1480456117764_26667"><b><span>todo with problem you seek help for. <br /></span></b></div><div
dir="ltr"id="yui_3_16_0_ym19_1_1480456117764_26668"><b><span><br /></span></b></div><div dir="ltr"
id="yui_3_16_0_ym19_1_1480456117764_26671"><bid="yui_3_16_0_ym19_1_1480456117764_26670"><span
id="yui_3_16_0_ym19_1_1480456117764_26669">Errorsby themself may or may not be explained. That is why it is very
importantto include a script</span></b></div><div dir="ltr" id="yui_3_16_0_ym19_1_1480456117764_26672"><b><span>that
willduplicate the error. If you go to a doctor and tell him you have a pain, do you expect him to <br
/></span></b></div><divdir="ltr" id="yui_3_16_0_ym19_1_1480456117764_26771"><b><span>tell you the cause right away, or
wouldyou understand if he asks you what led up to the pain? <br /></span></b></div><div dir="ltr"
id="yui_3_16_0_ym19_1_1480456117764_26673"><b><span><br/></span></b></div><div dir="ltr"
id="yui_3_16_0_ym19_1_1480456117764_26674"><bid="yui_3_16_0_ym19_1_1480456117764_26997"><span
id="yui_3_16_0_ym19_1_1480456117764_26996">Yes,I am a volunteer. In fact, I am a retired PostgreSQL DBA. Hopefully you
willnow understand the</span></b></div><div dir="ltr" id="yui_3_16_0_ym19_1_1480456117764_26998"><b><span>difference
betweena transaction and a stand alone query. Good luck.</span></b></div><div
id="yui_3_16_0_ym19_1_1480456117764_25762"> </div><divclass="signature" id="yui_3_16_0_ym19_1_1480456117764_25740"><div
id="RTEContent"><fontsize="4"><span style="font-weight:bold;font-family:arial;color:rgb(0, 0, 255);">Melvin Davidson
</span></font><br/><font size="3">     Cell 720-320-0155 <br /></font><font id="yui_3_16_0_ym19_1_1480456117764_25760"
size="3"style="font-weight:bold;"><span id="yui_3_16_0_ym19_1_1480456117764_25761" style="color:rgb(128, 0, 255);">I
reservethe right to fantasize.  Whether or not you </span><br style="color:rgb(128, 0, 255);" /><span
id="yui_3_16_0_ym19_1_1480456117764_25759"style="color:rgb(128, 0, 255);">wish to share my fantasy is entirely up to
you.</span><img data-id="53bf0ce2-e2c8-7b6a-7ce8-436c79183efa"
src="http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/01.gif"style="color:rgb(128, 0, 255);" /><br /></font><font
id="yui_3_16_0_ym19_1_1467319472979_3360"size="3" style="font-weight:bold;">www.youtube.com/unusedhero/videos<br
/></font><fontsize="3"><span style="font-weight:bold;font-family:courier;">Folk Alley - All Folk - 24 Hours a day
</span><spanstyle="font-weight:bold;font-family:courier;"><br />www.folkalley.com<br /><br
/></span></font></div></div><divclass="qtdSeparateBR"><br /><br /></div><div class="yahoo_quoted"
id="yui_3_16_0_ym19_1_1480456117764_25745"style="display: block;"><div id="yui_3_16_0_ym19_1_1480456117764_25744"
style="font-family:Courier New, courier, monaco, monospace, sans-serif; font-size: 16px;"><div
id="yui_3_16_0_ym19_1_1480456117764_25743"style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida
Grande,sans-serif; font-size: 16px;"><div dir="ltr" id="yui_3_16_0_ym19_1_1480456117764_25742"><font face="Arial"
size="2"><hrsize="1" /><b><span style="font-weight:bold;">From:</span></b> Malik Rumi <malik.a.rumi@gmail.com><br
/><b><spanstyle="font-weight: bold;">To:</span></b> Melvin Davidson <melvin6925@yahoo.com> <br /><b><span
style="font-weight:bold;">Cc:</span></b> PgAdmin Support <pgadmin-support@postgresql.org><br /><b><span
style="font-weight:bold;">Sent:</span></b> Tuesday, November 29, 2016 5:14 PM<br /><b><span style="font-weight:
bold;">Subject:</span></b>Re: [pgadmin-support] ROLLBACK syntax error in pgadmin4<br /></font></div><div
class="y_msg_container"id="yui_3_16_0_ym19_1_1480456117764_25746"><br /><div id="yiv2072469051"><div
id="yui_3_16_0_ym19_1_1480456117764_25754"><divdir="ltr" id="yui_3_16_0_ym19_1_1480456117764_25753"><div
id="yui_3_16_0_ym19_1_1480456117764_25752"><divid="yui_3_16_0_ym19_1_1480456117764_25751"><div
id="yui_3_16_0_ym19_1_1480456117764_25750"><divid="yui_3_16_0_ym19_1_1480456117764_25749"><div
id="yui_3_16_0_ym19_1_1480456117764_25748"><divid="yui_3_16_0_ym19_1_1480456117764_25747">Ok, I am not trying to be
difficult.I am trying to understand. If that sounds defensive, it's because of prior experience on Stack Overflow,
wherethe "experts" tend to be snarky, IMHO.<br clear="none" /><br clear="none" /></div>I did all of this in PGAdmin4,
sothat is why I posted here. How would I determine what is a PGAdmin4 issue and what is not?<br clear="none" /><br
clear="none"/></div>I <b>did</b> tell you my OS in the <i id="yui_3_16_0_ym19_1_1480456117764_25755">very first line of
myvery first post</i> on this issue. I also told you my postgres version <u><i>on that same line</i></u>. When you say
'exact',do you mean 9.4.8, instead of just 9.4?<br clear="none" /><br clear="none" /></div>True enough, I did not give
youthe entire SQL, but I did give you the error, which quoted what I assumed were the relevant portions of the SQL. I'm
sorryif that wasn't enough. <br clear="none" /><br clear="none" /></div>I gave you the background on what I had done to
finda solution on my own. I also asked a lot of questions which I hoped would clarify my understanding of the problem,
butthey have not been addressed. <br clear="none" /><br clear="none" /></div>All in all, I thought I was being pretty
verboseand specific. Maybe too much so. When you put together the lack of response to my specific questions, and asking
forOS and PG version info I already gave, well, it's kinda discouraging. But it's a free service, and I assume you are
avolunteer with a life and issues of your own. At least you responded, and fairly soon. A lot of people don't even get
that.<br clear="none" /><br clear="none" /></div>I'm going to restart and hope for the best. I've learned that fsync is
supposedto be on by default, so if the uncheck of autocommit did what it was supposed to do, I should be fine. If not,
Ihave a backup. I just wanted to learn. <br clear="none" /></div><div class="yiv2072469051yqt9980183305"
id="yiv2072469051yqt10485"><divclass="yiv2072469051gmail_extra" id="yui_3_16_0_ym19_1_1480456117764_25940"><br
clear="none"/><div class="yiv2072469051gmail_quote" id="yui_3_16_0_ym19_1_1480456117764_25939">On Tue, Nov 29, 2016 at
12:59PM, Melvin Davidson <span dir="ltr"><<a href="mailto:melvin6925@yahoo.com" rel="nofollow" shape="rect"
target="_blank"ymailto="mailto:melvin6925@yahoo.com">melvin6925@yahoo.com</a>></span> wrote:<br clear="none"
/><blockquoteclass="yiv2072469051gmail_quote" id="yui_3_16_0_ym19_1_1480456117764_25938" style="margin:0 0 0
.8ex;border-left:1px#ccc solid;padding-left:1ex;"><div id="yui_3_16_0_ym19_1_1480456117764_25937"><div
id="yui_3_16_0_ym19_1_1480456117764_25936"style="color:#000;background-color:#fff;font-family:Courier New, courier,
monaco,monospace, sans-serif;font-size:16px;"><div
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_21878"><b>Malik,</b></div><div
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_21877"><b><brclear="none" /></b></div><div
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_21936"><b
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22068">Firstthings first.</b></div><div
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_21876"><b
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22067">1.This is not the correct forum for this
problem.</b></div><divid="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_21811"><b><br clear="none"
/></b></div><divdir="ltr" id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_21812"><b
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22663">PgAdminis a utility for managing
PostgreSQL.</b></div><divdir="ltr" id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_21937"><b><br
clear="none"/></b></div><div dir="ltr" id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_21938"><b
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22066">Youare better off re-submitting this problem to
pgsql-general</b><bid="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22417">@<a
href="http://postgresql.org/"rel="nofollow" shape="rect" target="_blank">postgresql.org</a></b></div><div dir="ltr"
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_21991"><b
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22065">butyou stand a better chance if you also
include</b></div><divdir="ltr" id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_21992"><b
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22416">A.O/S</b></div><div dir="ltr"
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22022"><b
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22418">B.<font color="#cd232c"
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22569">Exactversion of PostgreSQL</font></b></div><div
dir="ltr"id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22109"><b
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22112">C.<font color="#cd232c">SQL code to reproduce
theproblem.</font><br clear="none" /></b></div><div
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_21765"><span><brclear="none" /></span></div><div
dir="ltr"id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22211"><b
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22328"><span
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22208">Asfor "</span>ERROR: current transaction is
aborted,commands ignored until end of transaction block"</b></div><div dir="ltr"
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22212"><b
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22327">Itmeans all commands from BEGIN; until the
erroroccurs are rolled back. No further commands</b></div><div dir="ltr"
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22301"><b
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22662">afterthe error occurs are executed.<br
clear="none"/></b></div><div id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_21760"> </div><div
class="yiv2072469051m_1911922675164783267signature"
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_21751"><div
id="yiv2072469051m_1911922675164783267RTEContent"><fontsize="4"><span
style="font-weight:bold;font-family:arial;color:rgb(0,0,255);">MelvinDavidson </span></font><br clear="none" /><span
class="yiv2072469051"><font id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_21750" size="3"
style="font-weight:bold;"><spanid="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_21759"
style="color:rgb(128,0,255);">Ireserve the right to fantasize.  Whether or not you </span><br clear="none"
style="color:rgb(128,0,255);"/><span id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_21749"
style="color:rgb(128,0,255);">wishto share my fantasy is entirely up to you. </span><img
data-id="da995f33-87fb-ef8d-aeba-686363b03f1b"src="http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/01.gif"
style="color:rgb(128,0,255);"/><br clear="none" /></font><font
id="yiv2072469051m_1911922675164783267yui_3_16_0_ym19_1_1467319472979_3360"size="3" style="font-weight:bold;"><a
href="http://www.youtube.com/unusedhero/videos"rel="nofollow" shape="rect" target="_blank">www.youtube.com/unusedhero/
videos</a><brclear="none" /></font><font id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_21758"
size="3"><spanid="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_21757"
style="font-weight:bold;font-family:courier;">FolkAlley - All Folk - 24 Hours a day </span><span
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22621"
style="font-weight:bold;font-family:courier;"><brclear="none" /><a href="http://www.folkalley.com/" rel="nofollow"
shape="rect"target="_blank">www.folkalley.com</a><br clear="none" /><br clear="none"
/></span></font></span></div></div><divclass="yiv2072469051m_1911922675164783267qtdSeparateBR"
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22107"><brclear="none" /><br clear="none" /></div><div
class="yiv2072469051m_1911922675164783267yahoo_quoted"
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22103"style="display:block;"><div
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22102"style="font-family:Courier New, courier, monaco,
monospace,sans-serif;font-size:16px;"><div id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22101"
style="font-family:HelveticaNeue,Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"><div
dir="ltr"id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22194"><font face="Arial"
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22624"size="2"><span class="yiv2072469051">
</span></font><hrid="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22623" size="1" /><b><span
style="font-weight:bold;">From:</span></b>Malik Rumi <<a href="mailto:malik.a.rumi@gmail.com" rel="nofollow"
shape="rect"target="_blank" ymailto="mailto:malik.a.rumi@gmail.com">malik.a.rumi@gmail.com</a>><br clear="none"
/><b><spanstyle="font-weight:bold;">To:</span></b> Melvin Davidson <<a href="mailto:melvin6925@yahoo.com"
rel="nofollow"shape="rect" target="_blank" ymailto="mailto:melvin6925@yahoo.com">melvin6925@yahoo.com</a>> <br
clear="none"/><b><span style="font-weight:bold;">Cc:</span></b> pgAdmin Support <<a
href="mailto:pgadmin-support@postgresql.org"rel="nofollow" shape="rect" target="_blank"
ymailto="mailto:pgadmin-support@postgresql.org">pgadmin-support@postgresql.org</a>><br clear="none" /><b><span
style="font-weight:bold;">Sent:</span></b>Tuesday, November 29, 2016 2:50 PM<br clear="none" /><b><span
style="font-weight:bold;">Subject:</span></b>Re: [pgadmin-support] ROLLBACK syntax error in pgadmin4<br clear="none"
/></div><divclass="yiv2072469051m_1911922675164783267y_msg_container"
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22100"><brclear="none" /><div
id="yiv2072469051m_1911922675164783267yiv2305844011"><div
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22099"><spanclass="yiv2072469051"></span><div
dir="ltr"id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22098"><div
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22097"><div
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22096"><div
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22095">Thankyou. However...<br clear="none" /><br
clear="none"/><div id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22094"
style="margin-left:40px;">ERROR:current transaction is aborted, commands ignored until end of transaction block<br
clear="none"/></div><br clear="none" /></div>I'm not even sure what this means. Which transaction is it referring to?
Therollback or the update?<br clear="none" /></div>What is the error and how do I fix it? What is meant by
"<i><u>until</u></i>end of transaction block"? Does that mean the entire transaction block, or that something might
happenafter the end of this block?<br clear="none" /><br clear="none" /></div><div
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22104">Idid some more googling, and found this from
thepostgresql list:<br clear="none" /><pre id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22139"
style="margin-left:40px;">Ifthat's what you're getting, the problem was with an earlier command  
that returned an error you didn't notice, not with the command you just
ran. <a href="https://www.postgresql.org/message-id/4CAB085C.5030106@postnewspapers.com.au"
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22140"rel="nofollow" shape="rect"
target="_blank">https://www.postgresql.org/message-id/4CAB085C.5030106@ postnewspapers.com.au</a> </pre>I suppose that
makessense and applies here, since I came here asking about two consecutive syntax errors in the first place. But I
stilldon't know how to safely back out of this situation. Any further advice? Anyone?<br clear="none" /></div><div
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22145"><brclear="none" /></div>p.s. - I said I had PG
9.4.I assumed everyone would know that meant Postgresql 9.4<br clear="none" /></div><div
class="yiv2072469051m_1911922675164783267yiv2305844011yqt1358800897"
id="yiv2072469051m_1911922675164783267yiv2305844011yqt78314"><div
class="yiv2072469051m_1911922675164783267yiv2305844011gmail_extra"
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22146"><brclear="none" /><div
class="yiv2072469051m_1911922675164783267yiv2305844011gmail_quote"
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22149"><spanclass="yiv2072469051">On Tue, Nov 29, 2016
at10:24 AM, Melvin Davidson <span dir="ltr"
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22148"><<ahref="mailto:melvin6925@yahoo.com"
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22147"rel="nofollow" shape="rect" target="_blank"
ymailto="mailto:melvin6925@yahoo.com">melvin6925@yahoo.com</a>></span>wrote:<br clear="none" /></span><blockquote
class="yiv2072469051m_1911922675164783267yiv2305844011gmail_quote"
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22153"style="margin:0 0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex;"><divid="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22152"><div
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22151"
style="color:#000;background-color:#fff;font-family:CourierNew, courier, monaco, monospace,
sans-serif;font-size:16px;"><spanclass="yiv2072469051"></span><div
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8438"><b
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22150">Theproblem is, ROLLBACK requires a transaction.
Soto use it properly you need to <br clear="none" /></b></div><div dir="ltr"
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8400"><b>startwith a
BEGINstatement.</b></div><div
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8439"><b><br
clear="none"/></b></div><div
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8387"><b>eg:</b></div><div
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8399"><b><br
clear="none"/></b></div><div
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8375"><b>BEGIN;</b></div><div
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8347"><b
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8847">your_statements;</b></div><div
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8363"><b>ROLLBACK;<br
clear="none"/></b></div><div
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8313"><b><span><br
clear="none"/></span></b></div><div
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8630"><b
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8848"><a
class="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673edited-link-editor"
href="https://www.postgresql.org/docs/9.4/static/sql-begin.html"
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8631"rel="nofollow"
shape="rect"target="_blank">https://www.postgresql.org/ docs/9.4/static/sql-begin.html<br clear="none"
/></a></b></div><div
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8629"><b><br
clear="none"/></b></div><div
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8850"><b
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8849"><a
class="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673edited-link-editor"
href="https://www.postgresql.org/docs/9.4/static/sql-rollback.html"
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8786"rel="nofollow"
shape="rect"target="_blank">https://www.postgresql.org/ docs/9.4/static/sql-rollback. html</a></b></div><div dir="ltr"
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8851"><b><a
class="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673edited-link-editor"
href="https://www.postgresql.org/docs/9.4/static/sql-rollback.html"
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8786"rel="nofollow"
shape="rect"target="_blank"><br clear="none" /></a></b></div><div
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8314"><divdir="ltr"
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8853"><b
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8852">fyi,in the
future,it is always a good idea to include the PostgreSQL version.</b></div><div dir="ltr"
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8854"><b><br
clear="none"/></b></div></div><div
class="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673signature"
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8318"><div
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673RTEContent"><font
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8502"size="4"><span
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8501"
style="font-weight:bold;font-family:arial;color:rgb(0,0,255);">MelvinDavidson </span></font><br clear="none" /><font
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8671"size="3"><br
clear="none"/></font><span class="yiv2072469051"><font
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8441"size="3"
style="font-weight:bold;"><span
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8440"
style="color:rgb(128,0,255);">Ireserve the right to fantasize.  Whether or not you </span><br clear="none"
style="color:rgb(128,0,255);"/><span
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8457"
style="color:rgb(128,0,255);">wishto share my fantasy is entirely up to you. </span><img
data-id="cf8fe00a-4afb-14ce-2413-d30aa00959cc"src="http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/01.gif"
style="color:rgb(128,0,255);"/><br clear="none" /></font><font
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_ym19_1_1467319472979_3360"size="3"
style="font-weight:bold;"><ahref="http://www.youtube.com/unusedhero/videos"
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22647"rel="nofollow" shape="rect"
target="_blank">www.youtube.com/unusedhero/videos</a><br clear="none" /></font><font
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8670"size="3"><span
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8669"
style="font-weight:bold;font-family:courier;">FolkAlley - All Folk - 24 Hours a day </span><span
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8673"
style="font-weight:bold;font-family:courier;"><brclear="none" /><a href="http://www.folkalley.com/" rel="nofollow"
shape="rect"target="_blank">www.folkalley.com</a><br clear="none" /><br clear="none"
/></span></font></span></div></div><div
class="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673qtdSeparateBR"
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8442"><br
clear="none"/><br clear="none" /></div><div
class="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yahoo_quoted"
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8446"
style="display:block;"><div
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8445"
style="font-family:CourierNew, courier, monaco, monospace, sans-serif;font-size:16px;"><div
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8444"
style="font-family:HelveticaNeue,Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"><span
class="yiv2072469051"></span><div dir="ltr"
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8503"><font
face="Arial"id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8674"
size="2"></font><hr size="1" /><b><span style="font-weight:bold;">From:</span></b> Malik Rumi <<a
href="mailto:malik.a.rumi@gmail.com"id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22630"
rel="nofollow"shape="rect" target="_blank" ymailto="mailto:malik.a.rumi@gmail.com">malik.a.rumi@gmail.com</a>><br
clear="none"/><b><span style="font-weight:bold;">To:</span></b> pgAdmin Support <<a
href="mailto:pgadmin-support@postgresql.org"rel="nofollow" shape="rect" target="_blank"
ymailto="mailto:pgadmin-support@postgresql.org">pgadmin-support@postgresql.org</a>> <br clear="none" /><b><span
style="font-weight:bold;">Sent:</span></b>Tuesday, November 29, 2016 1:17 PM<br clear="none" /><b><span
style="font-weight:bold;">Subject:</span></b>[pgadmin-support] ROLLBACK syntax error in pgadmin4<br clear="none"
/></div><divid="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22718"><div
class="yiv2072469051m_1911922675164783267yiv2305844011h5"
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22717"><div
class="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673y_msg_container"
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8443"><br
clear="none"/><div id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yiv6295819857"><div
dir="ltr"id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8447"><span
class="yiv2072469051"id="yui_3_16_0_ym19_1_1480456117764_25953">I am using PGAdmin4 with PG 9.4 on Ubuntu 16.04 64 bit.
Iwanted to do an update, but was unsure of the result, so I unselected autocommit and ran explain. It said only one row
wasaffected, which I didn’t understand, because it should have affected at least 2. Then I inferred that the ‘one row’
beingreferred to was the plan, not the rows in my data. </span><div
class="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yiv6295819857gmail-western"
style="margin-bottom:0in;line-height:100%;"></div><div
class="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yiv6295819857gmail-western"
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8448"
style="margin-bottom:0in;line-height:100%;">ThenI ran the update, again no autocommit, and it was not what I expected.
Sothen I added ROLLBACK to the end of the query, ran it again, and got this error:</div><div
class="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yiv6295819857gmail-western"
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8449"
style="margin-bottom:0in;line-height:100%;margin-left:40px;">ERROR:syntax error at or near "ROLLBACK" LINE 1: ...de"
SETchildof_id = NULL WHERE codelevelsortseq=1 ROLLBACK;</div><div
class="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yiv6295819857gmail-western"
id="yui_3_16_0_ym19_1_1480456117764_25955"style="margin-bottom:0in;line-height:100%;">I then did a new query, with just
ROLLBACK;as I see it explained with an example in the docs: <a
href="https://www.postgresql.org/docs/9.4/static/sql-rollback.html"id="yui_3_16_0_ym19_1_1480456117764_25984"
rel="nofollow"shape="rect" target="_blank">https://www.postgresql.org/ docs/9.4/static/sql-rollback. html</a></div><div
class="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yiv6295819857gmail-western"
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8451"
style="margin-bottom:0in;line-height:100%;">Nevertheless,I got the same error:</div><div
class="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yiv6295819857gmail-western"
id="yui_3_16_0_ym19_1_1480456117764_25956"style="margin-bottom:0in;line-height:100%;margin-left:40px;">ERROR: syntax
errorat or near "ROLLBACK" LINE 1: ...F, VERBOSE ON, COSTS ON, BUFFERS OFF, TIMING OFF) ROLLBACK;</div><br clear="none"
/>Notein this case ROLLBACK; is the only thing on Line 1. The error carat (^) is pointing at the R in both cases. No
otherqueries have been run in the interim. <div
class="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yiv6295819857gmail-western"
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8455"
style="margin-bottom:0in;line-height:100%;">Tomy surprise, there are very few Google hits for this exact search:
</div><divclass="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yiv6295819857gmail-western"
id="yui_3_16_0_ym19_1_1480456117764_25985"style="margin-bottom:0in;line-height:100%;margin-left:40px;">"syntax error at
ornear 'ROLLBACK'" About 30 results (0.34 seconds) </div><div
class="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yiv6295819857gmail-western"
id="yui_3_16_0_ym19_1_1480456117764_25987"style="margin-bottom:0in;line-height:100%;">The first two hits are for a bug
reportfrom Nov. of 2006, which was fixed then and there. I don’t think this is the same bug, if it is a bug. </div><div
class="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yiv6295819857gmail-western"
id="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yui_3_16_0_1_1480442930679_8453"
style="margin-bottom:0in;line-height:100%;">Idid find DISCARD in the docs: <a
href="https://www.postgresql.org/docs/9.4/static/sql-discard.html"id="yui_3_16_0_ym19_1_1480456117764_26002"
rel="nofollow"shape="rect" target="_blank">https://www.postgresql.org/ docs/9.4/static/sql-discard. html</a> however, I
havenot run it because I wanted some clarity here and didn’t want to interfere with my ROLLBACK, if it would even have
thateffect.</div><span class="yiv2072469051"> </span><div
class="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yiv6295819857gmail-western"
style="margin-bottom:0in;line-height:100%;">So,my questions:</div><div
class="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yiv6295819857gmail-western"
id="yui_3_16_0_ym19_1_1480456117764_26004"style="margin-bottom:0in;line-height:100%;">1. How do I discard this update
andget my data back?</div><div
class="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yiv6295819857gmail-western"
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22721"style="margin-bottom:0in;line-height:100%;">2.
Howdo I check to make sure it really isn’t committed without upsetting my ROLLBACK options? (Yes, I do have a backup I
cango to, but I would rather understand what is happening and fix it).</div><div
class="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yiv6295819857gmail-western"
style="margin-bottom:0in;line-height:100%;">4.If it isn’t committed, and this is a bug, can I just close PGAdmin4
and/orPG and discard the changes that way?</div><div
class="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yiv6295819857gmail-western"
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22722"style="margin-bottom:0in;line-height:100%;">5.
Isthis a new, different bug?</div><div
class="yiv2072469051m_1911922675164783267yiv2305844011m_5682970348618810673yiv6295819857gmail-western"
id="yiv2072469051m_1911922675164783267yui_3_16_0_1_1480447941789_22724"style="margin-bottom:0in;line-height:100%;">6.
Whatwas that 'one row effected' about?<br clear="none" /></div></div></div><br clear="none" /><br clear="none"
/></div></div></div></div></div></div></div></div></blockquote></div><brclear="none" /></div></div></div></div><br
clear="none"/><br clear="none" /></div></div></div></div></div></div></blockquote></div><br clear="none"
/></div></div></div></div><br/><br /></div></div></div></div></div>