pgadmin-org / pgadmin3

Archive of the pgAdmin III project
https://www.pgadmin.org/
Other
178 stars 82 forks source link

Bugs in dlgType (RM #511) #281

Closed dpage closed 2 years ago

dpage commented 13 years ago

Issue migrated from Redmine: https://redmine.postgresql.org/issues/511 Originally created by Guillaume Lelarge at 2010-10-24 01:39:03 UTC.

All the bugs are related to composite types.

Let's say I add two members. First one is named c1, of type varchar(10), and second one is an integer named c2. If I click on c1, I see a datatype "character varying(10)" and a length of 10. Length textbox is disabled, whereas it should be enabled because the composite type isn't yet created and I should be able to change it. I also think that datatype should display "character varying" (ie, without the length). As the combobox is enabled, a user can think he could change the length by typing it, but alas, put another length and the "Add/change" button is suddenly disabled (because the "character varying(20)" is not part of the cached type. You can of course get rid of the length to only have "character varying", which is found in the types cache and which makes the Length textbox enabled. I would say umbersome UI, don't you think.

But wait, there's more. Click on the integer member. The length textbox still shows the length of the previous member you selected (and precision too if you have one). Length and Precision textboxes are disabled, but it still is a weird UI.

Now, let's add a third member, c3 of type numeric(10,5). Select the c1 member. Oh, Length textbox is still enabled. Precision textbox still shows 2. Click on the c2 member, same behaviour (I have an integer member with a length of 10 (remember the textbox is enabled), and a disabled precision of 2. Now click again on the c1 member, and change the size to 12. Click on the c2 member: Length enabled of value 12, and Precision disabled of value 2. Weirder. Click on member c3: Length enabled of value 12 (whereas it should be 10), Precision disabled of value 2.

In fact, the datatype combobox always shows the good type, with length and precision. The issue is that you need to change the text in the combobox to make it look like before, and then change Length and Precision to the correct ones, to be able to change the type. And you have to forget the values in these textboxes when you select a member because they usually are wrong.

dpage commented 13 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/511#note-1 Originally created by Guillaume Lelarge at 2010-10-24 01:43:42 UTC.

Fixed in http://git.postgresql.org/gitweb?p=pgadmin3.git;a=commit;h=b2463c51f35706ac1b09f94967615805c49a26d3 and http://git.postgresql.org/gitweb?p=pgadmin3.git;a=commit;h=4ed3b473d0d7db9f3b9143f68930ef4e35e26951

Redmine ticket header update:

Name Old Value New Value
Status changed New Resolved
Resolution changed fixed
dpage commented 2 years ago

Issue closed on Redmine.