Re: hacking on Beta 1.6 - scratch pad is dangerous :)

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Harald Armin Massa" <haraldarminmassa(at)gmail(dot)com>
Cc: <pgadmin-support(at)postgresql(dot)org>
Subject: Re: hacking on Beta 1.6 - scratch pad is dangerous :)
Date: 2006-09-15 10:28:56
Message-ID: E7F85A1B5FF8D44C8A1AF6885BC9A0E40154CCD6@ratbert.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

________________________________

From: Harald Armin Massa [mailto:haraldarminmassa(at)gmail(dot)com]
Sent: 15 September 2006 09:49
To: Dave Page
Cc: pgadmin-support(at)postgresql(dot)org
Subject: hacking on Beta 1.6 - scratch pad is dangerous :)


I am sooo impressed with this new release! And that scratch pad
is a really helpfull addition, I fell in love with it.

BUT... that is a dangerous love, I learned.

What happened?

I constructed a fine query:

select md5(array_to_string(array( select md5(id_pkl||id_label ||
id_lg || name_l||letztespeicherung) from otlabel where quarant=0 ),''))

ran it, got a checksum for a WHOLE table (I was sooo proud of
myself :) ...

:-)


and copied it to the scratch pad.

Then, I wanted to test if this checksum really changes when
changes are made to the table ... , so I changed the query:

select md5(array_to_string(array( select md5(id_pkl||id_label ||
id_lg || name_l||letztespeicherung||'pgadmin is great') from otlabel
where quarant=0 ),''))

and pressed F5. Quickly, the interface blinked, and --- the
result stayed the same! Wuha?

I changed the query more and more, nearly panicked ...

and then learned: hey, I was pressing F5 with focus on the
scratch pad. NOTHING was done to my query result :( Of course not ---
it's just a scratch pad.

So I propose a small change: as you allready capture F5 and F7
within the scratch pad, at least give a dialog saying something along
"ha-ha! nothing happens in the scratch pad"

What platform? I just tried this on Windows and it works perfectly. The
code is also written such that F5 should always execute the query... oh
hang on - I don't suppose you had un-docked the scratch pad? If so, it
becomes a seperate window controlled by the layout manager. There's no
way for me to catch keypresses in that unless I do some *really* funky
stuff writing custom versions of each undockable contro for each window.
I'm not sure I'd want to though, as F5 in one window really shouldn't
affect another anyway, even if it is undocked (imho). That would
potentially violate the principle of least surprise.

Regards, Dave.

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Dave Page 2006-09-15 11:08:03 Re: hacking on Beta 1.6 - scratch pad is dangerous :)
Previous Message Dave Page 2006-09-15 10:10:22 Re: Crash while trying to open some help page