Thread: [pgAdmin III] #148: Miscellaneous requests for the query tool

[pgAdmin III] #148: Miscellaneous requests for the query tool

From
"pgAdmin Trac"
Date:
#148: Miscellaneous requests for the query tool
-------------------------------+--------------------------------------------
 Reporter:  Dickson S. Guedes  |       Owner:  Dickson S. Guedes
     Type:  bug                |      Status:  new              
 Priority:  minor              |   Milestone:                   
Component:  pgadmin            |     Version:  trunk            
 Keywords:  querytool          |    Platform:  all              
-------------------------------+--------------------------------------------
 I'm thinking that there are some things that could enhance the query
 history: allow the user defines the max size of the query that could be
 added in history, the total number of queries stored and avoid store
 itentical queries.

--
Ticket URL: <http://code.pgadmin.org/trac/ticket/148>
pgAdmin III <http://code.pgadmin.org/trac/>
pgAdmin III

Re: [pgAdmin III] #148: Miscellaneous requests for the query tool

From
"Dickson S. Guedes"
Date:
2010/3/15 pgAdmin Trac <trac@code.pgadmin.org>:
> #148: Miscellaneous requests for the query tool
>  allow the user defines the max size of the query that could be added in history,

Done, default to 100.

> the total number of queries stored

Done, default to 10.

> avoid store  itentical queries.

Done, but at now it avoids only identical queries. If we run the same
query only changing some spaces or tabs it'll allow the inclusion of
the query in the history. I don't know if this "duplication" may be
accepted as a "expected behaviour" or a bug.

> ask for query deletion

Done, using 'NO' as default.

This patch fixes the 'SetMacrosFile' in sysSettings.h, too.

Patch attached. Comments?

Thanks.

Dickson S. Guedes
mail/xmpp: guedes@guedesoft.net - skype: guediz
http://guedesoft.net - http://www.postgresql.org.br

Attachment

Re: [pgAdmin III] #148: Miscellaneous requests for the query tool

From
Guillaume Lelarge
Date:
Le 20/03/2010 05:14, Dickson S. Guedes a écrit :
> 2010/3/15 pgAdmin Trac <trac@code.pgadmin.org>:
>> #148: Miscellaneous requests for the query tool
>>  allow the user defines the max size of the query that could be added in history,
>
> Done, default to 100.
>
>> the total number of queries stored
>
> Done, default to 10.
>
>> avoid store  itentical queries.
>
> Done, but at now it avoids only identical queries. If we run the same
> query only changing some spaces or tabs it'll allow the inclusion of
> the query in the history. I don't know if this "duplication" may be
> accepted as a "expected behaviour" or a bug.
>
>> ask for query deletion
>
> Done, using 'NO' as default.
>
> This patch fixes the 'SetMacrosFile' in sysSettings.h, too.
>
> Patch attached. Comments?
>

Applies and compiles with no issue. Anyways there are a few things that
I don't like.

When the combobox contains the maximum number of queries, it should
delete the older one and record the new one whereas now it simply
doesn't do anything.

What happens when pgAdmin loads a queries file with more than the
maximum number of queries in it? AFAICT, it loads everything. I think it
shouldn't. It should only load the X last one (X being the maximum
number of queries).

I don't think the default maximum query size is sane. 100 characters are
really not enough. At least 1024 (much like track_activity_query_size).
By the way, I also don't think we should talk in bytes. It's a number of
characters.

I think that's all for me. Can you send us an updated patch?

Thanks a lot.


--
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com

Re: [pgAdmin III] #148: Miscellaneous requests for the query tool

From
"pgAdmin Trac"
Date:
#148: Miscellaneous requests for the query tool
-------------------------------+--------------------------------------------
 Reporter:  Dickson S. Guedes  |       Owner:  Dickson S. Guedes
     Type:  feature            |      Status:  new              
 Priority:  minor              |   Milestone:                   
Component:  pgadmin            |     Version:  trunk            
 Keywords:  querytool          |    Platform:  all              
-------------------------------+--------------------------------------------
Changes (by gleu):

  * type:  bug => feature


--
Ticket URL: <http://code.pgadmin.org/trac/ticket/148#comment:1>
pgAdmin III <http://code.pgadmin.org/trac/>
pgAdmin III

Re: [pgAdmin III] #148: Miscellaneous requests for the query tool

From
"Dickson S. Guedes"
Date:
2010/3/20 Guillaume Lelarge <guillaume@lelarge.info>:
> Applies and compiles with no issue.

Good!

> Anyways there are a few things that I don't like.

I'm already wainting for. :-)

> When the combobox contains the maximum number of queries, it should
> delete the older one and record the new one whereas now it simply
> doesn't do anything.

Yes, i was in doubt whether I delete the oldest query or not, but your
review answers my doubt.

> What happens when pgAdmin loads a queries file with more than the
> maximum number of queries in it? AFAICT, it loads everything. I think it
> shouldn't. It should only load the X last one (X being the maximum
> number of queries).

I agree.

> I don't think the default maximum query size is sane. 100 characters are
> really not enough. At least 1024 (much like track_activity_query_size).
> By the way, I also don't think we should talk in bytes. It's a number of
> characters.

Sounds better for me, too.

> I think that's all for me. Can you send us an updated patch?

Yes, I can.

> Thanks a lot.

Thank you too.

[]s
Dickson S. Guedes
mail/xmpp: guedes@guedesoft.net - skype: guediz
http://guedesoft.net - http://www.postgresql.org.br

Re: [pgAdmin III] #148: Miscellaneous requests for the query tool

From
Guillaume Lelarge
Date:
Le 21/03/2010 18:53, Dickson S. Guedes a écrit :
> 2010/3/20 Guillaume Lelarge <guillaume@lelarge.info>:
>> Applies and compiles with no issue.
>
> Good!
>
>> Anyways there are a few things that I don't like.
>
> I'm already wainting for. :-)
>
>> When the combobox contains the maximum number of queries, it should
>> delete the older one and record the new one whereas now it simply
>> doesn't do anything.
>
> Yes, i was in doubt whether I delete the oldest query or not, but your
> review answers my doubt.
>
>> What happens when pgAdmin loads a queries file with more than the
>> maximum number of queries in it? AFAICT, it loads everything. I think it
>> shouldn't. It should only load the X last one (X being the maximum
>> number of queries).
>
> I agree.
>
>> I don't think the default maximum query size is sane. 100 characters are
>> really not enough. At least 1024 (much like track_activity_query_size).
>> By the way, I also don't think we should talk in bytes. It's a number of
>> characters.
>
> Sounds better for me, too.
>
>> I think that's all for me. Can you send us an updated patch?
>
> Yes, I can.
>

Did you find some time to finish this patch?


--
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com

Re: [pgAdmin III] #148: Miscellaneous requests for the query tool

From
"pgAdmin Trac"
Date:
#148: Miscellaneous requests for the query tool
-------------------------------+--------------------------------------------
 Reporter:  Dickson S. Guedes  |       Owner:  Dickson S. Guedes
     Type:  feature            |      Status:  new              
 Priority:  minor              |   Milestone:  1.12             
Component:  pgadmin            |     Version:  trunk            
 Keywords:  querytool          |    Platform:  all              
-------------------------------+--------------------------------------------
Changes (by gleu):

  * milestone:  => 1.12


--
Ticket URL: <http://code.pgadmin.org/trac/ticket/148#comment:2>
pgAdmin III <http://code.pgadmin.org/trac/>
pgAdmin III

Re: [pgAdmin III] #148: Miscellaneous requests for the query tool

From
Guillaume Lelarge
Date:
Le 11/04/2010 09:37, Guillaume Lelarge a écrit :
> Le 21/03/2010 18:53, Dickson S. Guedes a écrit :
>> 2010/3/20 Guillaume Lelarge <guillaume@lelarge.info>:
>>> Applies and compiles with no issue.
>>
>> Good!
>>
>>> Anyways there are a few things that I don't like.
>>
>> I'm already wainting for. :-)
>>
>>> When the combobox contains the maximum number of queries, it should
>>> delete the older one and record the new one whereas now it simply
>>> doesn't do anything.
>>
>> Yes, i was in doubt whether I delete the oldest query or not, but your
>> review answers my doubt.
>>
>>> What happens when pgAdmin loads a queries file with more than the
>>> maximum number of queries in it? AFAICT, it loads everything. I think it
>>> shouldn't. It should only load the X last one (X being the maximum
>>> number of queries).
>>
>> I agree.
>>
>>> I don't think the default maximum query size is sane. 100 characters are
>>> really not enough. At least 1024 (much like track_activity_query_size).
>>> By the way, I also don't think we should talk in bytes. It's a number of
>>> characters.
>>
>> Sounds better for me, too.
>>
>>> I think that's all for me. Can you send us an updated patch?
>>
>> Yes, I can.
>>
>
> Did you find some time to finish this patch?
>

You won't need to. I changed your patch to mke it commitable. Patch
attached.

Comments?


--
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com

Attachment

Re: [pgAdmin III] #148: Miscellaneous requests for the query tool

From
"pgAdmin Trac"
Date:
#148: Miscellaneous requests for the query tool
--------------------------------+-------------------------------------------
  Reporter:  Dickson S. Guedes  |       Owner:  Dickson S. Guedes
      Type:  feature            |      Status:  closed           
  Priority:  minor              |   Milestone:  1.12             
 Component:  pgadmin            |     Version:  trunk            
Resolution:  fixed              |    Keywords:  querytool        
  Platform:  all                |  
--------------------------------+-------------------------------------------
Changes (by gleu):

  * status:  new => closed
  * resolution:  => fixed


Comment:

 Done in r8305.

--
Ticket URL: <http://code.pgadmin.org/trac/ticket/148#comment:3>
pgAdmin III <http://code.pgadmin.org/trac/>
pgAdmin III

Re: [pgAdmin III] #148: Miscellaneous requests for the query tool

From
Guillaume Lelarge
Date:
Le 24/04/2010 21:45, Guillaume Lelarge a écrit :
> Le 11/04/2010 09:37, Guillaume Lelarge a écrit :
>> Le 21/03/2010 18:53, Dickson S. Guedes a écrit :
>>> 2010/3/20 Guillaume Lelarge <guillaume@lelarge.info>:
>>>> Applies and compiles with no issue.
>>>
>>> Good!
>>>
>>>> Anyways there are a few things that I don't like.
>>>
>>> I'm already wainting for. :-)
>>>
>>>> When the combobox contains the maximum number of queries, it should
>>>> delete the older one and record the new one whereas now it simply
>>>> doesn't do anything.
>>>
>>> Yes, i was in doubt whether I delete the oldest query or not, but your
>>> review answers my doubt.
>>>
>>>> What happens when pgAdmin loads a queries file with more than the
>>>> maximum number of queries in it? AFAICT, it loads everything. I think it
>>>> shouldn't. It should only load the X last one (X being the maximum
>>>> number of queries).
>>>
>>> I agree.
>>>
>>>> I don't think the default maximum query size is sane. 100 characters are
>>>> really not enough. At least 1024 (much like track_activity_query_size).
>>>> By the way, I also don't think we should talk in bytes. It's a number of
>>>> characters.
>>>
>>> Sounds better for me, too.
>>>
>>>> I think that's all for me. Can you send us an updated patch?
>>>
>>> Yes, I can.
>>>
>>
>> Did you find some time to finish this patch?
>>
>
> You won't need to. I changed your patch to mke it commitable. Patch
> attached.
>

Commited.


--
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com

Re: [pgAdmin III] #148: Miscellaneous requests for the query tool

From
Guillaume Lelarge
Date:
Le 27/04/2010 23:47, Guillaume Lelarge a écrit :
> Le 24/04/2010 21:45, Guillaume Lelarge a écrit :
>> Le 11/04/2010 09:37, Guillaume Lelarge a écrit :
>>> Le 21/03/2010 18:53, Dickson S. Guedes a écrit :
>>>> 2010/3/20 Guillaume Lelarge <guillaume@lelarge.info>:
>>>>> Applies and compiles with no issue.
>>>>
>>>> Good!
>>>>
>>>>> Anyways there are a few things that I don't like.
>>>>
>>>> I'm already wainting for. :-)
>>>>
>>>>> When the combobox contains the maximum number of queries, it should
>>>>> delete the older one and record the new one whereas now it simply
>>>>> doesn't do anything.
>>>>
>>>> Yes, i was in doubt whether I delete the oldest query or not, but your
>>>> review answers my doubt.
>>>>
>>>>> What happens when pgAdmin loads a queries file with more than the
>>>>> maximum number of queries in it? AFAICT, it loads everything. I think it
>>>>> shouldn't. It should only load the X last one (X being the maximum
>>>>> number of queries).
>>>>
>>>> I agree.
>>>>
>>>>> I don't think the default maximum query size is sane. 100 characters are
>>>>> really not enough. At least 1024 (much like track_activity_query_size).
>>>>> By the way, I also don't think we should talk in bytes. It's a number of
>>>>> characters.
>>>>
>>>> Sounds better for me, too.
>>>>
>>>>> I think that's all for me. Can you send us an updated patch?
>>>>
>>>> Yes, I can.
>>>>
>>>
>>> Did you find some time to finish this patch?
>>>
>>
>> You won't need to. I changed your patch to mke it commitable. Patch
>> attached.
>>
>
> Commited.
>

Of, I forgot to say: Thanks Dickson. Sorry about this :/


--
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com