This is a discussion on Beta 2 Wednesday? within the pgsql Interfaces Pgadmin Hackers forums, part of the PostgreSQL category; --> Any objections? Regards, Dave ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Dave Page a écrit : > Any objections? > Yes, one. Sorry I've discussed a bit with Pavel about his problem with functions. It seems pgAdmin lacks two new parameters for CREATE FUNCTION dialog : COST and ROWS. I was on the way to add these on dlgFunction. In fact, there are two questions. First, do we want them in pgAdmin 1.8.0 ? because it means adding new strings, which is not a really great news for translators. Next, if we want them, do we wait for this patch to release beta 2 ? Regards. -- Guillaume. <!-- http://abs.traduc.org/ http://lfs.traduc.org/ http://docs.postgresqlfr.org/ --> ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings |
| |||
| Guillaume Lelarge wrote: > Dave Page a écrit : >> Any objections? >> > > Yes, one. Sorry > > I've discussed a bit with Pavel about his problem with functions. It > seems pgAdmin lacks two new parameters for CREATE FUNCTION dialog : COST > and ROWS. No it doesn't: http://svn.pgadmin.org/cgi-bin/viewc...=6159&view=rev Regards, Dave. ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster |
| |||
| Dave Page a écrit : > Guillaume Lelarge wrote: >> Dave Page a écrit : >>> Any objections? >>> >> >> Yes, one. Sorry >> >> I've discussed a bit with Pavel about his problem with functions. It >> seems pgAdmin lacks two new parameters for CREATE FUNCTION dialog : COST >> and ROWS. > > No it doesn't: > > http://svn.pgadmin.org/cgi-bin/viewc...=6159&view=rev > Hmmm... it seems you're right and I'm stupid have not seen it. Thanks. PS : so, I've no objection for beta 2 on wednesday. -- Guillaume. <!-- http://abs.traduc.org/ http://lfs.traduc.org/ http://docs.postgresqlfr.org/ --> ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend |
| |||
| Guillaume Lelarge a écrit : > PS : so, I've no objection for beta 2 on wednesday. > In fact, I have one. I just fixed a bug on the creation of a function without cost parameter but there's still one unfixed. It's in dlgFunction.cpp source file, method CheckChange. I think the problem is on these lines : if (!isProcedure || !connection->EdbMinimumVersion(8, 0)) CheckValid(enable, cbLanguage->GetCurrentSelection() >= 0, _("Please select language.")); There's something wrong in this test with a vanilla PostgreSQL. When I comment these lines, I can apply my changes on a function's definition. Otherwise, the OK button remains disabled whatever changes I could have done. But I have absolutely no idea what's going wrong here. Dave, can you take a look at this before building beta 2 ? Thanks. Regards. -- Guillaume. <!-- http://abs.traduc.org/ http://lfs.traduc.org/ http://docs.postgresqlfr.org/ --> ---------------------------(end of broadcast)--------------------------- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate |
| |||
| Guillaume Lelarge wrote: > Dave Page a écrit : >> Guillaume Lelarge wrote: >>> Dave Page a écrit : >>>> Any objections? >>>> >>> Yes, one. Sorry >>> >>> I've discussed a bit with Pavel about his problem with functions. It >>> seems pgAdmin lacks two new parameters for CREATE FUNCTION dialog : COST >>> and ROWS. >> No it doesn't: >> >> http://svn.pgadmin.org/cgi-bin/viewc...=6159&view=rev >> > > Hmmm... it seems you're right and I'm stupid > have not seen it. Stupid is a bit harsh - sleepy perhaps? Or drunk? :-) /D ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq |
| |||
| Guillaume Lelarge wrote: > Guillaume Lelarge a écrit : >> PS : so, I've no objection for beta 2 on wednesday. >> > > In fact, I have one. I just fixed a bug on the creation of a function > without cost parameter but there's still one unfixed. It's in > dlgFunction.cpp source file, method CheckChange. I think the problem is > on these lines : > > if (!isProcedure || !connection->EdbMinimumVersion(8, 0)) > CheckValid(enable, cbLanguage->GetCurrentSelection() >= 0, > _("Please select language.")); > > > There's something wrong in this test with a vanilla PostgreSQL. When I > comment these lines, I can apply my changes on a function's definition. > Otherwise, the OK button remains disabled whatever changes I could have > done. But I have absolutely no idea what's going wrong here. Dave, can > you take a look at this before building beta 2 ? Thanks. I couldn't reproduce the problem myself (against PG 8.2.4), but I agree that the logic in the check is in need of attention. I've committed a slightly more sane version - please check it's OK for you. Thanks, Dave ---------------------------(end of broadcast)--------------------------- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate |
| |||
| Dave Page a écrit : > Guillaume Lelarge wrote: >> Guillaume Lelarge a écrit : >>> PS : so, I've no objection for beta 2 on wednesday. >>> >> In fact, I have one. I just fixed a bug on the creation of a function >> without cost parameter but there's still one unfixed. It's in >> dlgFunction.cpp source file, method CheckChange. I think the problem is >> on these lines : >> >> if (!isProcedure || !connection->EdbMinimumVersion(8, 0)) >> CheckValid(enable, cbLanguage->GetCurrentSelection() >= 0, >> _("Please select language.")); >> >> >> There's something wrong in this test with a vanilla PostgreSQL. When I >> comment these lines, I can apply my changes on a function's definition. >> Otherwise, the OK button remains disabled whatever changes I could have >> done. But I have absolutely no idea what's going wrong here. Dave, can >> you take a look at this before building beta 2 ? Thanks. > > I couldn't reproduce the problem myself (against PG 8.2.4), but I agree > that the logic in the check is in need of attention. I've committed a > slightly more sane version - please check it's OK for you. > Sorry, I still reproduce it under PostgreSQL 8.2.4+ and PostgreSQL HEAD. Here are steps to reproduce problem : - right click on a function - choose Properties - change function's name OK button will not be enabled, SQL string will not show. -- Guillaume. http://www.postgresqlfr.org http://docs.postgresqlfr.org ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings |
| |||
| Guillaume Lelarge wrote: > Sorry, I still reproduce it under PostgreSQL 8.2.4+ and PostgreSQL HEAD. > > Here are steps to reproduce problem : > - right click on a function > - choose Properties > - change function's name > > OK button will not be enabled, SQL string will not show. Are you sure you're running the build you think you are? Following the steps you detail above works perfectly on PostgreSQL 8.2.4 and EnterpriseDB AS 8.2 for me. I've tried C, pl/pgsql and edbspl functions (though the latter only on EDB of course). Not that it should matter, but this is SVN head of pgAdmin, running on XP. Regards, Dave. ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend |
| ||||
| Dave Page a écrit : > Guillaume Lelarge wrote: >> Sorry, I still reproduce it under PostgreSQL 8.2.4+ and PostgreSQL HEAD. >> >> Here are steps to reproduce problem : >> - right click on a function >> - choose Properties >> - change function's name >> >> OK button will not be enabled, SQL string will not show. > > Are you sure you're running the build you think you are? Following the > steps you detail above works perfectly on PostgreSQL 8.2.4 and > EnterpriseDB AS 8.2 for me. I've tried C, pl/pgsql and edbspl functions > (though the latter only on EDB of course). > > Not that it should matter, but this is SVN head of pgAdmin, running on XP. > OK, I think I've found a fix to Pavel's issue. To check cbLanguage, we use GetCurrentSelection. When I try to change an already defined function, GetCurrentSelection always returns -1 which is an invalid value. If I use GetGuessedSelection (with every other changes needed to use ctlComboBox instead of wxComboBox), it works great. I'm not sure this is the right way to fix this, so here is the patch. As always, comments welcomed. Regards. -- Guillaume. <!-- http://abs.traduc.org/ http://lfs.traduc.org/ http://docs.postgresqlfr.org/ --> ---------------------------(end of broadcast)--------------------------- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate |
| Thread Tools | |
| Display Modes | |
|
|