Thread: Since I can't seem to unsubscribe to this mailing list, I might as well report a bug...

Since I can't seem to unsubscribe to this mailing list, I might as well report a bug...

From
hushthatbush@hushmail.com
Date:
When working in the SQL query window in pgAdmin, keeping it open for the whole day, I sometimes notice that it will
randomlytell me that I have a syntax error somewhere in it when I run it, without having changed anything. If I just
clicksomewhere else inside the window, such as placing the marker in the end of the query, and execute it again, it
willrun. So without any actual changes, it runs/doesn't run.
 

Is this known? Why does it happen? How can it be possible? And so on.

(No, I cannot reliably reproduce this. I don't even know when it happens. I just know it does happen, and has happened
formany versions of pgAdmin over the years.)
 




<div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:16px"><div
dir="ltr"id="yui_3_16_0_1_1423699543774_3838"><span id="yui_3_16_0_1_1423699543774_3868">I can't really say whether it
isa "known problem" or not, but I can tell you that keeping the SQL query window "open for the whole day" is definitely
NOTA GOOD IDEA. Aside for the obvious case where someone else could possibly access your computer and do nasty things
whenyou are not watching, there is also the possibility of power glitches and accidentally hitting the keystrokes
.</span></div><divdir="ltr" id="yui_3_16_0_1_1423699543774_3846"><br /><span></span></div><div dir="ltr"><span>So I can
onlycaution you to do the prudent thing and only open the SQL window when you have to do transactions/queries and close
itwhen you are done. It really doesn't take that long to open or close.</span></div><div
id="yui_3_16_0_1_1423699543774_3837"> </div><divclass="signature" id="yui_3_16_0_1_1423699543774_3796"><div
id="RTEContent"><fontid="yui_3_16_0_1_1423699543774_3845" size="4"><span id="yui_3_16_0_1_1423699543774_3844"
style="font-weight:bold;font-family:arial;color:rgb(0,0, 255);">Melvin Davidson </span></font><br /><font
id="yui_3_16_0_1_1423699543774_3836"size="3">     Cell 720-320-0155 <br /></font><br /><font
id="yui_3_16_0_1_1423699543774_3820"size="3"><span id="yui_3_16_0_1_1423699543774_3819"
style="font-weight:bold;font-family:courier;">FolkAlley - All Folk - 24 Hours a day </span><span
style="font-weight:bold;font-family:courier;"><br/>www.folkalley.com<br /><br /></span></font></div></div><br /><div
style="font-family:verdana, helvetica, sans-serif; font-size: 16px;"><div style="font-family: HelveticaNeue, Helvetica
Neue,Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"><div dir="ltr"><hr size="1" /><font face="Arial"
size="2"><b><span style="font-weight:bold;">From:</span></b> "hushthatbush@hushmail.com"
<hushthatbush@hushmail.com><br/><b><span style="font-weight: bold;">To:</span></b>
"pgadmin-support@postgresql.org"<pgadmin-support@postgresql.org> <br /><b><span style="font-weight:
bold;">Sent:</span></b>Wednesday, February 11, 2015 4:03 PM<br /><b><span style="font-weight:
bold;">Subject:</span></b>[pgadmin-support] Since I can't seem to unsubscribe to this mailing list, I might as well
reporta bug...<br /></font></div><div class="y_msg_container"><br />When working in the SQL query window in pgAdmin,
keepingit open for the whole day, I sometimes notice that it will randomly tell me that I have a syntax error somewhere
init when I run it, without having changed anything. If I just click somewhere else inside the window, such as placing
themarker in the end of the query, and execute it again, it will run. So without any actual changes, it runs/doesn't
run.<br/><br />Is this known? Why does it happen? How can it be possible? And so on.<br /><br />(No, I cannot reliably
reproducethis. I don't even know when it happens. I just know it does happen, and has happened for many versions of
pgAdminover the years.)<br /><br /><br /><br />-- <br />Sent via pgadmin-support mailing list (<a
href="mailto:pgadmin-support@postgresql.org"
ymailto="mailto:pgadmin-support@postgresql.org">pgadmin-support@postgresql.org</a>)<br/>To make changes to your
subscription:<br/><a href="http://www.postgresql.org/mailpref/pgadmin-support"
target="_blank">http://www.postgresql.org/mailpref/pgadmin-support</a><br/><br /><br /></div></div></div></div> 

On 12 February 2015 at 02:33, <hushthatbush@hushmail.com> wrote:
I sometimes notice that it will randomly tell me that I have a syntax error somewhere in it when I run it, without having changed anything. If I just click somewhere else inside the window, such as placing the marker in the end of the query, and execute it again, it will run.

​I have a good feeling that this is because the times when it gives 'syntax error' either by mistake or unknown to you, the SQL query window has something selected (by mouse / shift + arrow keys)​ and then (by design) PgAdmin runs just that piece of text. In most cases the obvious error would be Syntax Error since now its a partial SQL being sent off to the PG database...  "if" this is happeneing, this is by-design and a 'feature'. In fact most common SQL query consoles (GUI) happen to work like this.
​​
--
Robins Tharakan

Re: Since I can't seem to unsubscribe to this mailing list, I might as well report a bug...

From
hushthatbush@hushmail.com
Date:
Whoa. That's actually quite scary since I had no idea about it. What if I had selected only the "DELETE FROM table"
from"DELETE FROM table WHERE id = 123"?! Now I have to worry about having done that (or something similar) in the past.
:/

On 2015-02-12 at 10:23 AM, "Robins Tharakan" <tharakan@gmail.com> wrote:
>
>On 12 February 2015 at 02:33, <hushthatbush@hushmail.com> wrote:
>
>> I sometimes notice that it will randomly tell me that I have a 
>syntax
>> error somewhere in it when I run it, without having changed 
>anything. If I
>> just click somewhere else inside the window, such as placing the 
>marker in
>> the end of the query, and execute it again, it will run.
>
>
>​
>​I have a good feeling that this is because the times when it 
>gives 'syntax
>error' either by mistake or unknown to you, the SQL query window 
>has
>something selected (by mouse / shift + arrow keys)​ and then (by 
>design)
>PgAdmin runs just that piece of text. In most cases the obvious 
>error would
>be Syntax Error since now its a partial SQL being sent off to the 
>PG
>database...  "if" this is happeneing, this is by-design and a 
>'feature'. In
>fact most common SQL query consoles (GUI) happen to work like this.
>​​
>--
>Robins Tharakan





On 12 February 2015 at 15:18, <hushthatbush@hushmail.com> wrote:
Whoa. That's actually quite scary since I had no idea about it. What if I had selected only the "DELETE FROM table" from "DELETE FROM table WHERE id = 123"?! Now I have to worry about having done that (or something similar) in the past. :/

Isn't that how the world works​?

SSMS (MS SQL Server) and Aqua Data Studio work like this for sure.. just like PgAdmin. I guess we'd need to be careful what 'gets run' when the UI allows this.

--
Robins Tharakan