Re: [pgadmin-support] PgAdmin Crash

2010-01-05 Thread Guillaume Lelarge
Le 05/01/2010 04:34, Franz Fritsche a écrit :
> Dear Guillaume!
> 
> I'm sorry, but I could not figure out how to reply to your post in the 
> mailing list. :-(
>  
>>> Obviously the problem is that "Properties..." is not disabled (grayed), 
>>> which it should be. 
>>> [... ] The same seems to be true for "Delete/Drop...", though selecting it 
>>> does 
>>> not produce a crash (it just seems to have no effect).
>>>
>> I have the same behaviour. In fact, you don't need the /q parameter to
>> trigger it. I added a ticket for this
> 
> Ah, you are right, just tried it! :-)
> 
> C:\Programme\PostgreSQL\8.4\bin\pgAdmin3.exe /s "PostgreSQL 8.4"
> 
> Found more problems (i.e. another crash) with this startup mode:
> 
> - Tools / Server Status ---> Crash!
> 
> Actually there are lots of differences (concerning the activated/disabled 
> commands in the menu) 
> between (a) standard startup and manual connection with the database and (b) 
> startup with 
> switch /s (->automatic connection):
> 
> (1) After standard startup and manual connection with database _and then 
> selecting "Server (1)" 
> in the Object Browser_ ALL commands in the menu "Tool" are grayed - not so 
> after startup with 
> /s.
> 
> (2) After standard startup [etc.] "File / Change Password..." is disabled 
> (grayed) - not so after 
> startup with /s. (!)
> 
> (3) After standard startup [etc.] "View / Refresh" is disabled (grayed) - not 
> so after startup with /s.
> 

This only happens on Windows, AFAICT. Problem is that the correct item
is not selected. The GUI should show the correct server highlighted. I
tried something yesterday but it didn't work out well. Will try once
again tonight.

> In addition "Edit / Copy" is not grayed in BOTH cases (a) and (b), though 
> it's not clear to me 
> what object might be copied when selected... ;-) Hence I guess it should be 
> disabled (in both 
> cases) too.
> 

Will look at this.

> 
> Sincerely,
> Franz Fritsche
> 
> 
> P.S. Just a comment: I'd propose to disable the toolbar button "Execute the 
> last used plugin." if 
> there are no plugins to execute (for the selected "object" in the Object 
> Viewer). This behaviour 
> would then be consistent with the behaviour of the other toolbar buttons. 
> (The "Execute..." button 
> seems to be a recent addition, right? After all I couldn't find it in the 
> Help documentation for 
> pgAdmin III.)
> 

Will look at this too.


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

-- 
Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-support


Re: [pgadmin-support] PgAdmin Crash

2010-01-05 Thread Guillaume Lelarge
Le 05/01/2010 17:40, Guillaume Lelarge a écrit :
> Le 05/01/2010 04:34, Franz Fritsche a écrit :
>> Dear Guillaume!
>>
>> I'm sorry, but I could not figure out how to reply to your post in the 
>> mailing list. :-(
>>  
 Obviously the problem is that "Properties..." is not disabled (grayed), 
 which it should be. 
 [... ] The same seems to be true for "Delete/Drop...", though selecting it 
 does 
 not produce a crash (it just seems to have no effect).

>>> I have the same behaviour. In fact, you don't need the /q parameter to
>>> trigger it. I added a ticket for this
>>
>> Ah, you are right, just tried it! :-)
>>
>> C:\Programme\PostgreSQL\8.4\bin\pgAdmin3.exe /s "PostgreSQL 8.4"
>>
>> Found more problems (i.e. another crash) with this startup mode:
>>
>> - Tools / Server Status ---> Crash!
>>
>> Actually there are lots of differences (concerning the activated/disabled 
>> commands in the menu) 
>> between (a) standard startup and manual connection with the database and (b) 
>> startup with 
>> switch /s (->automatic connection):
>>
>> (1) After standard startup and manual connection with database _and then 
>> selecting "Server (1)" 
>> in the Object Browser_ ALL commands in the menu "Tool" are grayed - not so 
>> after startup with 
>> /s.
>>
>> (2) After standard startup [etc.] "File / Change Password..." is disabled 
>> (grayed) - not so after 
>> startup with /s. (!)
>>
>> (3) After standard startup [etc.] "View / Refresh" is disabled (grayed) - 
>> not so after startup with /s.
>>
> 
> This only happens on Windows, AFAICT. Problem is that the correct item
> is not selected. The GUI should show the correct server highlighted. I
> tried something yesterday but it didn't work out well. Will try once
> again tonight.
> 

At last, I found that it has nothing to do with Windows. I suppose you
unchecked the "restore environment" checkbox for this server, didn't you?


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

-- 
Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-support


Re: [pgadmin-support] PgAdmin Crash

2010-01-05 Thread Guillaume Lelarge
Le 05/01/2010 18:33, Guillaume Lelarge a écrit :
> Le 05/01/2010 17:40, Guillaume Lelarge a écrit :
>> Le 05/01/2010 04:34, Franz Fritsche a écrit :
>>> Dear Guillaume!
>>>
>>> I'm sorry, but I could not figure out how to reply to your post in the 
>>> mailing list. :-(
>>>  
> Obviously the problem is that "Properties..." is not disabled (grayed), 
> which it should be. 
> [... ] The same seems to be true for "Delete/Drop...", though selecting 
> it does 
> not produce a crash (it just seems to have no effect).
>
 I have the same behaviour. In fact, you don't need the /q parameter to
 trigger it. I added a ticket for this
>>>
>>> Ah, you are right, just tried it! :-)
>>>
>>> C:\Programme\PostgreSQL\8.4\bin\pgAdmin3.exe /s "PostgreSQL 8.4"
>>>
>>> Found more problems (i.e. another crash) with this startup mode:
>>>
>>> - Tools / Server Status ---> Crash!
>>>
>>> Actually there are lots of differences (concerning the activated/disabled 
>>> commands in the menu) 
>>> between (a) standard startup and manual connection with the database and 
>>> (b) startup with 
>>> switch /s (->automatic connection):
>>>
>>> (1) After standard startup and manual connection with database _and then 
>>> selecting "Server (1)" 
>>> in the Object Browser_ ALL commands in the menu "Tool" are grayed - not so 
>>> after startup with 
>>> /s.
>>>
>>> (2) After standard startup [etc.] "File / Change Password..." is disabled 
>>> (grayed) - not so after 
>>> startup with /s. (!)
>>>
>>> (3) After standard startup [etc.] "View / Refresh" is disabled (grayed) - 
>>> not so after startup with /s.
>>>
>>
>> This only happens on Windows, AFAICT. Problem is that the correct item
>> is not selected. The GUI should show the correct server highlighted. I
>> tried something yesterday but it didn't work out well. Will try once
>> again tonight.
>>
> 
> At last, I found that it has nothing to do with Windows. I suppose you
> unchecked the "restore environment" checkbox for this server, didn't you?
> 
> 

This patch should fix this issue.

Comments?


-- 
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com
diff --git a/pgadmin/frm/frmMain.cpp b/pgadmin/frm/frmMain.cpp
index 8069faa..240a475 100644
--- a/pgadmin/frm/frmMain.cpp
+++ b/pgadmin/frm/frmMain.cpp
@@ -964,12 +964,12 @@ int frmMain::ReconnectServer(pgServer *server, bool restore)
 
 server->ShowTreeDetail(browser);
 
+browser->Freeze();
 if (restore && server->GetRestore())
-{
-browser->Freeze();
 item=RestoreEnvironment(server);
-browser->Thaw();
-}
+else
+item = server->GetId();
+browser->Thaw();
 
 if (item)
 {
@@ -979,6 +979,7 @@ int frmMain::ReconnectServer(pgServer *server, bool restore)
 browser->Expand(item);
 browser->EnsureVisible(item);
 }
+
 if (item)
 EndMsg(true);
 else

-- 
Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-support


Re: [pgadmin-support] PgAdmin Crash

2010-01-05 Thread Guillaume Lelarge
Le 05/01/2010 17:40, Guillaume Lelarge a écrit :
> Le 05/01/2010 04:34, Franz Fritsche a écrit :
>> [...]
>> P.S. Just a comment: I'd propose to disable the toolbar button "Execute the 
>> last used plugin." if 
>> there are no plugins to execute (for the selected "object" in the Object 
>> Viewer). This behaviour 
>> would then be consistent with the behaviour of the other toolbar buttons. 
>> (The "Execute..." button 
>> seems to be a recent addition, right? After all I couldn't find it in the 
>> Help documentation for 
>> pgAdmin III.)
>>
> 
> Will look at this too.
> 

The "Execute the last used plugin." is a special button because it
brings a submenu. I'm not sure we really need to have the same behaviour
on it. All submenus are grayed when they need to be, so you can't crash
it AFAICT.


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

-- 
Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-support


Re: [pgadmin-support] Bug: PgAdmin not displaying typmod column types correctly in create or display

2010-01-05 Thread Guillaume Lelarge
Le 04/01/2010 13:29, Obe, Regina a écrit :
> I assume this is a PgAdmin III bug, but I could be wrong.
> I'm using PgAdmin 1.10.1 on Windows, but seems to be an issue with even 1.8 
> since I tried on that too.
> 
> The upcoming PostGIS 1.5 has a new type called geography that uses the Typmod 
> functionality introduced in 8.3.
> 
> I'm guessing this is a display bug in how PgAdmin is displaying typmod types.
> 
> Details here
> 
> http://trac.osgeo.org/postgis/ticket/368
> 
> What is interesting is if I do a select of the table in question, the 
> geography header shows correctly as
> 
> geography(Point,4326) or geography(Linestring,4326)
> 
> so it seems its just in the 
> 
> CREATE TABLE ... that displays on the side panel of PgAdmin or when you 
> select generate create script.
> 
> 

Seems you're right. It should be easy to fix, but I want to find if
there are any corner cases. Anyways, I created a ticket for your bug:
http://code.pgadmin.org/trac/ticket/125

> I could of sworn I saw it right at some point before (but installing a 
> previous experimental build of PostGIS behaved the same). Perhaps I was 
> always focusing on the display of the SELECT... of its display in phppgadmin 
> which correctly displays the type.
> 

I don't think so. I can be wrong, but I don't think we did something
like that before. typmod is available since 1.10, and I don't remember
we fix something for typmod in 1.10.1.

> In case you need to test, have windows experimental builds here
> http://www.postgis.org/download/windows/experimental.php
> 

I tried it, but failed to make it work. Finally, I compiled PostGIS SVN
on Linux, which was more easy.


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

-- 
Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-support