Обсуждение: Small annoyance in pgAdmin 1.10
Hello, this is no bug, but a little bit annoying: I sometimes accidently hit the tab "Graphical Query Builder" in the Query window. No big deal, I just click on "SQL Editor" to get back, but then a dialog pops up: "No SQL query was generated.". Wouldn't it be possible to suppress that dialog? Rainer
Le vendredi 7 août 2009 à 09:56:34, Rainer Bauer a écrit : > Hello, > > this is no bug, but a little bit annoying: I sometimes accidently hit > the tab "Graphical Query Builder" in the Query window. No big deal, I > just click on "SQL Editor" to get back, but then a dialog pops up: "No > SQL query was generated.". > > Wouldn't it be possible to suppress that dialog? > I looked a bit at this. We could at least avoid the dialog when no tables are put on the graphical query builder. I suppose it means we need to change the definition of gqbController::generateSQL() method. There's good chance it will be seen as a "new feature", rather than a debug. I'll record a ticket for this. Thanks. -- Guillaume.http://www.postgresqlfr.orghttp://dalibo.com
On Fri, Aug 7, 2009 at 17:09, Guillaume Lelarge<guillaume@lelarge.info> wrote: > Le vendredi 7 août 2009 à 09:56:34, Rainer Bauer a écrit : >> Hello, >> >> this is no bug, but a little bit annoying: I sometimes accidently hit >> the tab "Graphical Query Builder" in the Query window. No big deal, I >> just click on "SQL Editor" to get back, but then a dialog pops up: "No >> SQL query was generated.". >> >> Wouldn't it be possible to suppress that dialog? >> > > I looked a bit at this. We could at least avoid the dialog when no tables are > put on the graphical query builder. I suppose it means we need to change the > definition of gqbController::generateSQL() method. There's good chance it will > be seen as a "new feature", rather than a debug. > > I'll record a ticket for this. While not a critical one, I'd qualify this as a bug. It seems like quite useless behaviour :-) -- Magnus HaganderMe: http://www.hagander.net/Work: http://www.redpill-linpro.com/
Le vendredi 7 août 2009 à 17:58:54, Magnus Hagander a écrit : > On Fri, Aug 7, 2009 at 17:09, Guillaume Lelarge<guillaume@lelarge.info> wrote: > > Le vendredi 7 août 2009 à 09:56:34, Rainer Bauer a écrit : > >> Hello, > >> > >> this is no bug, but a little bit annoying: I sometimes accidently hit > >> the tab "Graphical Query Builder" in the Query window. No big deal, I > >> just click on "SQL Editor" to get back, but then a dialog pops up: "No > >> SQL query was generated.". > >> > >> Wouldn't it be possible to suppress that dialog? > > > > I looked a bit at this. We could at least avoid the dialog when no tables > > are put on the graphical query builder. I suppose it means we need to > > change the definition of gqbController::generateSQL() method. There's > > good chance it will be seen as a "new feature", rather than a debug. > > > > I'll record a ticket for this. > > While not a critical one, I'd qualify this as a bug. It seems like > quite useless behaviour :-) OK, I've changed the ticket. -- Guillaume.http://www.postgresqlfr.orghttp://dalibo.com
Le vendredi 7 août 2009 à 18:12:00, Guillaume Lelarge a écrit : > Le vendredi 7 août 2009 à 17:58:54, Magnus Hagander a écrit : > > On Fri, Aug 7, 2009 at 17:09, Guillaume Lelarge<guillaume@lelarge.info> > > wrote: > > > Le vendredi 7 août 2009 à 09:56:34, Rainer Bauer a écrit : > > >> Hello, > > >> > > >> this is no bug, but a little bit annoying: I sometimes accidently hit > > >> the tab "Graphical Query Builder" in the Query window. No big deal, I > > >> just click on "SQL Editor" to get back, but then a dialog pops up: "No > > >> SQL query was generated.". > > >> > > >> Wouldn't it be possible to suppress that dialog? > > > > > > I looked a bit at this. We could at least avoid the dialog when no > > > tables are put on the graphical query builder. I suppose it means we > > > need to change the definition of gqbController::generateSQL() method. > > > There's good chance it will be seen as a "new feature", rather than a > > > debug. > > > > > > I'll record a ticket for this. > > > > While not a critical one, I'd qualify this as a bug. It seems like > > quite useless behaviour :-) > > OK, I've changed the ticket. Here is a patch that should fix this. Magnus, care to check it? I'm not ready to commit it without proper review. It plays with pointers, and that scares me a bit :) -- Guillaume.http://www.postgresqlfr.orghttp://dalibo.com
On Mon, Aug 10, 2009 at 1:44 PM, Guillaume Lelarge<guillaume@lelarge.info> wrote: > Here is a patch that should fix this. Magnus, care to check it? I'm not ready > to commit it without proper review. It plays with pointers, and that scares me > a bit :) Passing a pointer to a wxString around is *always* wrong. It can futz with the internal reference counting. -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com
Le lundi 10 août 2009 à 14:49:21, Dave Page a écrit : > On Mon, Aug 10, 2009 at 1:44 PM, Guillaume > > Lelarge<guillaume@lelarge.info> wrote: > > Here is a patch that should fix this. Magnus, care to check it? I'm not > > ready to commit it without proper review. It plays with pointers, and > > that scares me a bit :) > > Passing a pointer to a wxString around is *always* wrong. It can futz > with the internal reference counting. If I can't use a pointer, I don't see how I can do this. Or should I just remove the MessageBox? -- Guillaume.http://www.postgresqlfr.orghttp://dalibo.com
<tt>Hi Guillaume,<br /><br /> Guillaume Lelarge wrote:</tt><blockquote cite="mid:200908101500.01133.guillaume@lelarge.info"type="cite"><pre wrap=""><tt>Le lundi 10 août 2009 à 14:49:21, Dave Pagea écrit : </tt></pre><blockquote type="cite"><pre wrap=""><tt>On Mon, Aug 10, 2009 at 1:44 PM, Guillaume Lelarge<a class="moz-txt-link-rfc2396E" href="mailto:guillaume@lelarge.info"><guillaume@lelarge.info></a> wrote: </tt></pre><blockquote type="cite"><pre wrap=""><tt>Here is a patch that should fix this. Magnus, care to check it? I'm not ready to commit it without proper review. It plays with pointers, and that scares me a bit :) </tt></pre></blockquote><pre wrap=""><tt>Passing a pointer to a wxString around is *always* wrong. It can futz with the internal reference counting. </tt></pre></blockquote><pre wrap=""><tt>If I can't use a pointer, I don't see how I can do this. Or should I just remove the MessageBox?</tt></pre></blockquote><tt>As per my understanding, you always can use reference in place of pointer.</tt><divclass="moz-signature"><tt>-- <br /></tt><div class="moz-signature"><tt> <font color="#666666">Thanks &Regards,<br /> Ashesh Vashi<br /><br /> EnterpriseDB INDIA: <a href="http://www.enterprisedb.com">http://www.enterprisedb.com</a></font> </tt></div></div>
On Mon, Aug 10, 2009 at 2:02 PM, Ashesh Vashi<ashesh.vashi@enterprisedb.com> wrote: > Hi Guillaume, > > Guillaume Lelarge wrote: > > Le lundi 10 août 2009 à 14:49:21, Dave Page a écrit : > > On Mon, Aug 10, 2009 at 1:44 PM, Guillaume > > Lelarge<guillaume@lelarge.info> wrote: > > Here is a patch that should fix this. Magnus, care to check it? I'm not > ready to commit it without proper review. It plays with pointers, and > that scares me a bit :) > > Passing a pointer to a wxString around is *always* wrong. It can futz > with the internal reference counting. > > If I can't use a pointer, I don't see how I can do this. Or should I just > remove the MessageBox? > > As per my understanding, you always can use reference in place of pointer. Yes, just pass by reference: bool generateSQL(const wxString &query); -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com
On Mon, Aug 10, 2009 at 2:03 PM, Dave Page<dpage@pgadmin.org> wrote: >> If I can't use a pointer, I don't see how I can do this. Or should I just >> remove the MessageBox? >> >> As per my understanding, you always can use reference in place of pointer. > > Yes, just pass by reference: > > bool generateSQL(const wxString &query); Of course, you might want to leave out the const decoration. -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com
On Mon, Aug 10, 2009 at 2:08 PM, Dave Page<dpage@pgadmin.org> wrote: > On Mon, Aug 10, 2009 at 2:03 PM, Dave Page<dpage@pgadmin.org> wrote: >>> If I can't use a pointer, I don't see how I can do this. Or should I just >>> remove the MessageBox? >>> >>> As per my understanding, you always can use reference in place of pointer. >> >> Yes, just pass by reference: >> >> bool generateSQL(const wxString &query); > > Of course, you might want to leave out the const decoration. Looking at this a little more closely, why not just add a new function: int gqbController::getTableCount() { return model->tablesCount(); } and call that from frmQuery? Assuming it can't already see model.... -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com
Le lundi 10 août 2009 à 15:17:17, Dave Page a écrit : > On Mon, Aug 10, 2009 at 2:08 PM, Dave Page<dpage@pgadmin.org> wrote: > > On Mon, Aug 10, 2009 at 2:03 PM, Dave Page<dpage@pgadmin.org> wrote: > >>> If I can't use a pointer, I don't see how I can do this. Or should I > >>> just remove the MessageBox? > >>> > >>> As per my understanding, you always can use reference in place of > >>> pointer. > >> > >> Yes, just pass by reference: > >> > >> bool generateSQL(const wxString &query); > > > > Of course, you might want to leave out the const decoration. > > Looking at this a little more closely, why not just add a new function: > > int gqbController::getTableCount() { return model->tablesCount(); } > > and call that from frmQuery? Assuming it can't already see model.... Why didn't I think about this quite easy solution? no issue with pointer or reference. So here is the patch. Thanks Dave and Ashesh :) -- Guillaume.http://www.postgresqlfr.orghttp://dalibo.com
On Mon, Aug 10, 2009 at 7:46 PM, Guillaume Lelarge<guillaume@lelarge.info> wrote: > Why didn't I think about this quite easy solution? no issue with pointer or > reference. So here is the patch. That looks much cleaner :-) Can we get some spaces in the function for ease of reading please? int getTableCount() { return model->tablesCount(); }; > Thanks Dave and Ashesh :) Np. -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com
Le lundi 10 août 2009 à 20:57:09, Dave Page a écrit : > On Mon, Aug 10, 2009 at 7:46 PM, Guillaume > > Lelarge<guillaume@lelarge.info> wrote: > > Why didn't I think about this quite easy solution? no issue with pointer > > or reference. So here is the patch. > > That looks much cleaner :-) Can we get some spaces in the function for > ease of reading please? > Done, and commited. Thanks. -- Guillaume.http://www.postgresqlfr.orghttp://dalibo.com
Hello Guillaume, Monday, August 10, 2009, 10:16:47 PM, you wrote: GL> Done, and commited. Thanks. Thanks for the quick fix. However how do I get hold of the latest developement Snapshot? <http://www.pgadmin.org/snapshots/win32/> only offers the old beta releases. And also I do have VS2005, the requirements to build pgAdmin are pretty high (from the INSTALL file): - Windows Installer XML v3. - wxMSW 2.8.x - libxml2 2.6.18 or above - libxslt 1.1.x or above - iconv 1.9.x or above What I would need is only the pgAdmin3.exe file. Can this be downloaded somewhere? If not, when will there be a point release containing the change? Rainer
Le mardi 11 août 2009 à 00:02:30, Rainer Bauer a écrit : > [...] > If not, when will there be a point release containing the change? > In fact, there are 16 bug fixes in 1.10, and 1 remaining to be fixed. But I don't know when we'll have a point release. -- Guillaume.http://www.postgresqlfr.orghttp://dalibo.com
On Tue, Aug 11, 2009 at 6:30 AM, Guillaume Lelarge<guillaume@lelarge.info> wrote: > Le mardi 11 août 2009 à 00:02:30, Rainer Bauer a écrit : >> [...] >> If not, when will there be a point release containing the change? >> > > In fact, there are 16 bug fixes in 1.10, and 1 remaining to be fixed. But I > don't know when we'll have a point release. As none are particularly serious, I'm not currently in a hurry. I do have a number of issues that have been reported by the EDB QA team when testing on Solaris SPARC - I'm currently trying (largely in vain it seems - no wonder they're getting taken over) to buy a box from Sun to allow me to hack on those issues without having to try to endure doing it over VNC or X... -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com