Re: [pgadmin-hackers] [pgAdmin III] #209: Connect to Server dialog buggy
#209: Connect to Server dialog buggy +--- Reporter: brsa| Owner: ashesh Type: bug | Status: assigned Priority: major | Milestone: 1.12 Component: pgadmin | Version: Keywords: SQL editor |Platform: windows +--- Changes (by dpage): * owner: dpage = ashesh * status: new = assigned -- Ticket URL: http://code.pgadmin.org/trac/ticket/209#comment:1 pgAdmin III http://code.pgadmin.org/trac/ pgAdmin III -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers
Re: [pgadmin-hackers] Re: [pgAdmin III] #198: Refreshing functions still causes them to disappear.
Le 12/07/2010 03:03, pgAdmin Trac a écrit : #198: Refreshing functions still causes them to disappear. --+- Reporter: Peter Geoghegan | Owner: gleu Type: bug | Status: reopened Priority: minor| Milestone: 1.12 Component: pgadmin | Version: trunk Resolution: |Keywords: functions Platform: all | --+- Changes (by brsa): * version: 1.10 = trunk * milestone: 1.10.4 = 1.12 Please don't change the version and milestone of a closed item. You can reopen a closed item if you found that it still doesn't work. If it doesn't work on trunk, just say so on the ticket by reopening it and add a comment. (part of the reason not to change the version and milestone is that we use them to know all bugfixes of a milestone. So, even if it is fixed in the bugfix release, you should not change the milestone and the version) -- Guillaume http://www.postgresql.fr http://dalibo.com -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers
Re: [pgadmin-hackers] [pgAdmin III] #210: Wrong Server selected after changing Group
Le 12/07/2010 03:33, Erwin Brandstetter a écrit : On Jul 12, 3:23 am, t...@code.pgadmin.org (pgAdmin Trac) wrote: #210: Wrong Server selected after changing Group BTW: it would be nice, if one could just rename a server Group instead of changing the attribute of every single contained server. But this is not an important feature, as it is rarely needed. I probably coded it wrong. I didn't want, at the time, to make a complete Group object. I wanted to have a simple way to group things. We can probably find a (UI) way to rename them. Right now, the best one can do is open the configuration file (or the registry) and change the Group value. -- Guillaume http://www.postgresql.fr http://dalibo.com -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers
Re: [pgadmin-hackers] [pgAdmin III] #209: Connect to Server dialog buggy
Le 12/07/2010 02:50, pgAdmin Trac a écrit : [...] Wishlist item: a way to close a connection without closing the SQL editor window. Another one on how to use a bugtracker :) You should have made two tickets for this one, one for the wishlist item, and one for the bug. They won't have the same version and milestone. They also won't have the same code patch. Etc, etc. -- Guillaume http://www.postgresql.fr http://dalibo.com -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers
Re: [pgadmin-hackers] 1.12.0 beta 3 uploaded
Le 12/07/2010 03:31, Erwin Brandstetter a écrit : I am testing beta3. So far, I have found a few bugs and created / reopened tickets accordingly. Great, thank you for your tests. We'll work to fix the bugs you've found. I will not be able to do a lot of testing, as I am away from July 15th to August, 20th - which is a good thing otherwise. :) Thailand and Cambodia. More than a month, lucky guy :) Wish you a great holiday there. Regards. -- Guillaume http://www.postgresql.fr http://dalibo.com -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers
[pgadmin-hackers] Re: [pgAdmin III] #198: Refreshing functions still causes them to disappear.
#198: Refreshing functions still causes them to disappear. --+- Reporter: Peter Geoghegan | Owner: gleu Type: bug | Status: reopened Priority: minor| Milestone: 1.10.4 Component: pgadmin | Version: 1.10 Resolution: |Keywords: functions Platform: all | --+- Changes (by gleu): * version: trunk = 1.10 * milestone: 1.12 = 1.10.4 -- Ticket URL: http://code.pgadmin.org/trac/ticket/198#comment:5 pgAdmin III http://code.pgadmin.org/trac/ pgAdmin III -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers
[pgadmin-hackers] [pgAdmin III] #211: close a connection without closing the SQL editor window
#211: close a connection without closing the SQL editor window ---+ Reporter: brsa | Owner: dpage Type: feature| Status: new Priority: minor | Milestone: Component: pgadmin| Version: trunk Keywords: querytool |Platform: all ---+ Wishlist item: a way to close a connection without closing the SQL editor window. -- Ticket URL: http://code.pgadmin.org/trac/ticket/211 pgAdmin III http://code.pgadmin.org/trac/ pgAdmin III -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers
Re: [pgadmin-hackers] [pgAdmin III] #209: Connect to Server dialog buggy
#209: Connect to Server dialog buggy ---+ Reporter: brsa | Owner: ashesh Type: bug| Status: assigned Priority: major | Milestone: 1.12 Component: pgadmin| Version: Keywords: querytool |Platform: windows ---+ Changes (by gleu): * keywords: SQL editor = querytool Old description: Testing v1.12beta3 (rev. 8448) on Windows XP Pro. Server = pg 8.4.4 on Debian Lenny. In the SQL editor try to connect to another server by choosing new connection from the connection combobox. - Selecting a different server triggers an immediate attempt to connect. (happens sometimes) The Username combobox behaves differently from the 2 other comboboxes: - The first user shown is the alphabetically first in the list, but it should be the user of the same name as in the current connection - if such a user exists. (happens always) - A click into the field does not open the list. (happens always) - Typed text is not completed, not even after moving the focus to another control. Only after clicking on the down arrow. (happens always) - This way I can enter non-existing users and try to connect with these. - pgAdmin randomly crashes when I try to use the feature. (happens sometimes) I had to try like 6 times, 3 times of which pgadmin crashed completely until I managed to open another connection. Wishlist item: a way to close a connection without closing the SQL editor window. New description: Testing v1.12beta3 (rev. 8448) on Windows XP Pro. Server = pg 8.4.4 on Debian Lenny. In the SQL editor try to connect to another server by choosing new connection from the connection combobox. - Selecting a different server triggers an immediate attempt to connect. (happens sometimes) The Username combobox behaves differently from the 2 other comboboxes: - The first user shown is the alphabetically first in the list, but it should be the user of the same name as in the current connection - if such a user exists. (happens always) - A click into the field does not open the list. (happens always) - Typed text is not completed, not even after moving the focus to another control. Only after clicking on the down arrow. (happens always) - This way I can enter non-existing users and try to connect with these. - pgAdmin randomly crashes when I try to use the feature. (happens sometimes) I had to try like 6 times, 3 times of which pgadmin crashed completely until I managed to open another connection. -- Comment: The wishlist item has been removed from this ticket. The ticket #211 will deal with it. -- Ticket URL: http://code.pgadmin.org/trac/ticket/209#comment:2 pgAdmin III http://code.pgadmin.org/trac/ pgAdmin III -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers
[pgadmin-hackers] SVN Commit by dpage: r8462 - in trunk/pgadmin3/pgadmin/include: dlg schema
Author: dpage Date: 2010-07-12 09:25:02 +0100 (Mon, 12 Jul 2010) New Revision: 8462 Revision summary: http://svn.pgadmin.org/cgi-bin/viewcvs.cgi/?rev=8462view=rev Log: Fix FTS help URLs [Ashesh Vashi] Modified: trunk/pgadmin3/pgadmin/include/dlg/dlgTextSearchConfiguration.h trunk/pgadmin3/pgadmin/include/dlg/dlgTextSearchDictionary.h trunk/pgadmin3/pgadmin/include/dlg/dlgTextSearchParser.h trunk/pgadmin3/pgadmin/include/dlg/dlgTextSearchTemplate.h trunk/pgadmin3/pgadmin/include/schema/pgTextSearchConfiguration.h trunk/pgadmin3/pgadmin/include/schema/pgTextSearchDictionary.h trunk/pgadmin3/pgadmin/include/schema/pgTextSearchParser.h trunk/pgadmin3/pgadmin/include/schema/pgTextSearchTemplate.h -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers
[pgadmin-hackers] SVN Commit by dpage: r8463 - in branches/REL-1_10_0_PATCHES/pgadmin3/pgadmin/include: dlg schema
Author: dpage Date: 2010-07-12 09:41:44 +0100 (Mon, 12 Jul 2010) New Revision: 8463 Revision summary: http://svn.pgadmin.org/cgi-bin/viewcvs.cgi/?rev=8463view=rev Log: Fix FTS help URLs [Ashesh Vashi] Modified: branches/REL-1_10_0_PATCHES/pgadmin3/pgadmin/include/dlg/dlgTextSearchConfiguration.h branches/REL-1_10_0_PATCHES/pgadmin3/pgadmin/include/dlg/dlgTextSearchDictionary.h branches/REL-1_10_0_PATCHES/pgadmin3/pgadmin/include/dlg/dlgTextSearchParser.h branches/REL-1_10_0_PATCHES/pgadmin3/pgadmin/include/dlg/dlgTextSearchTemplate.h branches/REL-1_10_0_PATCHES/pgadmin3/pgadmin/include/schema/pgTextSearchConfiguration.h branches/REL-1_10_0_PATCHES/pgadmin3/pgadmin/include/schema/pgTextSearchDictionary.h branches/REL-1_10_0_PATCHES/pgadmin3/pgadmin/include/schema/pgTextSearchParser.h branches/REL-1_10_0_PATCHES/pgadmin3/pgadmin/include/schema/pgTextSearchTemplate.h -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers
[pgadmin-hackers] SVN Commit by dpage: r8464 - trunk/pgadmin3/pgadmin/schema
Author: dpage Date: 2010-07-12 10:24:35 +0100 (Mon, 12 Jul 2010) New Revision: 8464 Revision summary: http://svn.pgadmin.org/cgi-bin/viewcvs.cgi/?rev=8464view=rev Log: Ensure functions refresh correctly. Ticket #198 Modified: trunk/pgadmin3/pgadmin/schema/pgFunction.cpp -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers
[pgadmin-hackers] SVN Commit by dpage: r8465 - branches/REL-1_10_0_PATCHES/pgadmin3/pgadmin/schema
Author: dpage Date: 2010-07-12 10:25:09 +0100 (Mon, 12 Jul 2010) New Revision: 8465 Revision summary: http://svn.pgadmin.org/cgi-bin/viewcvs.cgi/?rev=8465view=rev Log: Ensure functions refresh correctly. Ticket #198 Modified: branches/REL-1_10_0_PATCHES/pgadmin3/pgadmin/schema/pgFunction.cpp -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers
[pgadmin-hackers] Re: [pgAdmin III] #198: Refreshing functions still causes them to disappear.
#198: Refreshing functions still causes them to disappear. --+- Reporter: Peter Geoghegan | Owner: gleu Type: bug | Status: closed Priority: minor| Milestone: 1.10.4 Component: pgadmin | Version: 1.10 Resolution: fixed|Keywords: functions Platform: all | --+- Changes (by dpage): * status: reopened = closed * resolution: = fixed -- Ticket URL: http://code.pgadmin.org/trac/ticket/198#comment:6 pgAdmin III http://code.pgadmin.org/trac/ pgAdmin III -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers
Re: [pgadmin-hackers] Re: [pgAdmin III] #198: Refreshing functions still causes them to disappear. (was: Refreshing functions within the object browser causes them to disappear)
Fixed in SVN. On Mon, Jul 12, 2010 at 2:03 AM, pgAdmin Trac t...@code.pgadmin.org wrote: #198: Refreshing functions still causes them to disappear. --+- Reporter: Peter Geoghegan | Owner: gleu Type: bug | Status: reopened Priority: minor | Milestone: 1.10.4 Component: pgadmin | Version: 1.10 Resolution: | Keywords: functions Platform: all | --+- Changes (by brsa): * status: closed = reopened * resolution: fixed = Comment: In pgadmin 1.12beta3 the problem is still present: if I refresh any individual function (of which there are hundreds) within the object browser, it disappears. - Does not happen with other collections, only with functions Hint: I suspect the bug has been with the fix for ticket #177 (crash on F5 after ALTER FUNCTION test() SET SCHEMA foo;). Only now, F5 makes the selected function disappear_every_ time instead of when it actually has disappeared. -- Ticket URL: http://code.pgadmin.org/trac/ticket/198#comment:3 pgAdmin III http://code.pgadmin.org/trac/ pgAdmin III -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com The Enterprise Postgres Company -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers
[pgadmin-hackers] Re: [pgAdmin III] #198: Refreshing functions still causes them to disappear.
#198: Refreshing functions still causes them to disappear. --+- Reporter: Peter Geoghegan | Owner: gleu Type: bug | Status: closed Priority: minor| Milestone: 1.10.4 Component: pgadmin | Version: 1.10 Resolution: fixed|Keywords: functions Platform: all | --+- Comment(by gleu): Fixed in r8464 and r8465. -- Ticket URL: http://code.pgadmin.org/trac/ticket/198#comment:7 pgAdmin III http://code.pgadmin.org/trac/ pgAdmin III -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers
[pgadmin-hackers] SVN Commit by dpage: r8466 - trunk/pgadmin3/pgadmin/dlg
Author: dpage Date: 2010-07-12 10:46:39 +0100 (Mon, 12 Jul 2010) New Revision: 8466 Revision summary: http://svn.pgadmin.org/cgi-bin/viewcvs.cgi/?rev=8466view=rev Log: Ensure a server remains selected when it is moved to another group. Ticket #210 Modified: trunk/pgadmin3/pgadmin/dlg/dlgServer.cpp -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers
Re: [pgadmin-hackers] [pgAdmin III] #210: Wrong Server selected after changing Group
#210: Wrong Server selected after changing Group --+- Reporter: brsa | Owner: dpage Type: bug | Status: closed Priority: minor| Milestone: 1.12 Component: pgadmin | Version: trunk Resolution: fixed|Keywords: object browser Platform: | --+- Changes (by dpage): * status: new = closed * resolution: = fixed Comment: Fixed in rev 8466 -- Ticket URL: http://code.pgadmin.org/trac/ticket/210#comment:1 pgAdmin III http://code.pgadmin.org/trac/ pgAdmin III -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers
Re: [pgadmin-hackers] Ticket 118: Exclusion constraints
On Sat, Jul 10, 2010 at 22:49, Guillaume Lelarge guilla...@lelarge.info wrote: Hi, At least, I finally did it :) This patch adds support for exclusion constraint (9.0 new feature). All examples from Magnus's talk (Beyond Unique) work with this patch. Anyway, this patch needs more work: 1. Displayed in both Constraints and Indexes I don't know why but each exclusion constraint is displayed two times. In the indexes node (where it doesn't belong), and in the constraints node (where it belongs). Any idea why? should not be too hard to find out, but I'm unable to find it right now. How do we do it with Primary Keys? It's the same thing - both an index and a constraint. There should be some code to hide it, thus similar code should be needed here. 2. Need an icon I copied the unique constraint icon, but we really need another one for this specific constraint. 3. Probably some misunderstanding of the feature Should we propose all operators for the columns? or just the ones related to 1. the operator class 2. the column's type 3. something else? actually, I propose all of them. But I don't think this is what we should do. You need to show only commutative operators. That may be we need to filter on oid=oprcom in pg_operator - I'm not sure of that though, I didn't really investigate, but it looks like a reasonable thing. And yes, it should definitely be filtered on the column types. In Magnus's talk, I see that only GiST is supported right now as an index method. In PostgreSQL fine manual, it says that, to be usable, an index should provide the amgettuple method. And I see three of them support this method. Who's wrong? :) Trust The Fine Manual. Always remember that some of those things may also have changed since my talk :-) -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/ -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers
Re: [pgadmin-hackers] [pgAdmin III] #209: Connect to Server dialog buggy
Hi Dave, Please find the patch for the same. *--** **Thanks Regards,** **Ashesh Vashi** **EnterpriseDB INDIA:* Enterprise Postgres Companyhttp://www.enterprisedb.com On Mon, Jul 12, 2010 at 12:58 PM, Dave Page dp...@pgadmin.org wrote: Please look at this. Thanks. -- Forwarded message -- From: pgAdmin Trac t...@code.pgadmin.org Date: Mon, Jul 12, 2010 at 1:50 AM Subject: [pgadmin-hackers] [pgAdmin III] #209: Connect to Server dialog buggy To: Cc: pgadmin-hackers@postgresql.org #209: Connect to Server dialog buggy +--- Reporter: brsa| Owner: dpage Type: bug | Status: new Priority: major | Milestone: 1.12 Component: pgadmin | Version: Keywords: SQL editor |Platform: windows +--- Testing v1.12beta3 (rev. 8448) on Windows XP Pro. Server = pg 8.4.4 on Debian Lenny. In the SQL editor try to connect to another server by choosing new connection from the connection combobox. - Selecting a different server triggers an immediate attempt to connect. (happens sometimes) The Username combobox behaves differently from the 2 other comboboxes: - The first user shown is the alphabetically first in the list, but it should be the user of the same name as in the current connection - if such a user exists. (happens always) - A click into the field does not open the list. (happens always) - Typed text is not completed, not even after moving the focus to another control. Only after clicking on the down arrow. (happens always) - This way I can enter non-existing users and try to connect with these. - pgAdmin randomly crashes when I try to use the feature. (happens sometimes) I had to try like 6 times, 3 times of which pgadmin crashed completely until I managed to open another connection. Wishlist item: a way to close a connection without closing the SQL editor window. -- Ticket URL: http://code.pgadmin.org/trac/ticket/209 pgAdmin III http://code.pgadmin.org/trac/ pgAdmin III -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com The Enterprise Postgres Company Index: pgAdmin3.cpp === --- pgAdmin3.cpp (revision 8461) +++ pgAdmin3.cpp (working copy) @@ -448,7 +448,8 @@ int rc=dlg.Go(conn, NULL); if (rc != wxID_OK) return false; -conn = dlg.CreateConn(applicationname); +bool dummyRes; +conn = dlg.CreateConn(applicationname, dummyRes); } else if (cmdParser.Found(wxT(Sc), connstr)) { @@ -539,7 +540,8 @@ int rc=dlg.Go(conn, NULL); if (rc != wxID_OK) return false; -conn = dlg.CreateConn(applicationname); +bool dummyRes; +conn = dlg.CreateConn(applicationname, dummyRes); } else if (cmdParser.Found(wxT(qc), connstr)) { Index: include/dlg/dlgSelectConnection.h === --- include/dlg/dlgSelectConnection.h (revision 8461) +++ include/dlg/dlgSelectConnection.h (working copy) @@ -24,7 +24,7 @@ ~dlgSelectConnection(); wxString GetHelpPage() const; pgServer *GetServer() { return remoteServer; } - pgConn *CreateConn(wxString applicationame); + pgConn *CreateConn(wxString applicationame, bool createdNew); pgConn *CreateConn(wxString server, wxString dbname, wxString username, int port, int sslmode, wxString applicationame, bool writeMRU = false); wxString GetServerName(); wxString GetDatabase(); Index: frm/frmQuery.cpp === --- frm/frmQuery.cpp (revision 8461) +++ frm/frmQuery.cpp (working copy) @@ -981,9 +981,10 @@ int rc=dlg.Go(conn, cbConnection); if (rc == wxID_OK) { +bool createdNewConn; wxString applicationname = _(pgAdmin - Query Tool); -conn = dlg.CreateConn(applicationname); -if (conn) +conn = dlg.CreateConn(applicationname, createdNewConn); +if (conn createdNewConn) { cbConnection-Insert(conn-GetName(), CreateBitmap(GetServerColour()), sel, (void*)conn); cbConnection-SetSelection(sel); Index: dlg/dlgSelectConnection.cpp === --- dlg/dlgSelectConnection.cpp (revision 8461) +++ dlg/dlgSelectConnection.cpp (working copy) @@ -84,6 +84,7 @@ return;
Re: [pgadmin-hackers] [pgAdmin III] #209: Connect to Server dialog buggy
On Mon, Jul 12, 2010 at 11:39 AM, Ashesh Vashi ashesh.va...@enterprisedb.com wrote: Hi Dave, Please find the patch for the same. Thanks. This looks good to me following some quick testing, but I uncovered some other issues - could you look at them please? - We seem to stop populating the server combo box as soon as we find the one we're currently connected to. This happens at ~ line 286 in dlgSelectConnection.cpp, where we set foundServer = true. I can't see why we do this, but it seems fairly deliberate. Any guesses? Should we just remove that? - It seems like we ignore sslmode when we create new connections. We need to honour the server config. Note that I haven't tested to ensure this doesn't break anything in command line startup mode (eg. with -q). Can you please ensure this mode is unaffected? Thanks. -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com The Enterprise Postgres Company -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers
Re: [pgadmin-hackers] [pgAdmin III] #209: Connect to Server dialog buggy
Hi Dave, PFA the updated patch. [Please check my inline answers.] On Mon, Jul 12, 2010 at 4:37 PM, Dave Page dp...@pgadmin.org wrote: On Mon, Jul 12, 2010 at 11:39 AM, Ashesh Vashi ashesh.va...@enterprisedb.com wrote: Hi Dave, Please find the patch for the same. Thanks. This looks good to me following some quick testing, but I uncovered some other issues - could you look at them please? - We seem to stop populating the server combo box as soon as we find the one we're currently connected to. This happens at ~ line 286 in dlgSelectConnection.cpp, where we set foundServer = true. I can't see why we do this, but it seems fairly deliberate. Any guesses? Should we just remove that? My mistake - I introduced that variable in the previous patch. - It seems like we ignore sslmode when we create new connections. We need to honour the server config. Done. Note that I haven't tested to ensure this doesn't break anything in command line startup mode (eg. with -q). Can you please ensure this mode is unaffected? Tested. * --** **Thanks Regards,** **Ashesh Vashi** **EnterpriseDB INDIA:* Enterprise Postgres Companyhttp://www.enterprisedb.com Thanks. -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com The Enterprise Postgres Company Index: pgAdmin3.cpp === --- pgAdmin3.cpp (revision 8466) +++ pgAdmin3.cpp (working copy) @@ -448,7 +448,8 @@ int rc=dlg.Go(conn, NULL); if (rc != wxID_OK) return false; -conn = dlg.CreateConn(applicationname); +bool dummyRes; +conn = dlg.CreateConn(applicationname, dummyRes); } else if (cmdParser.Found(wxT(Sc), connstr)) { @@ -539,7 +540,8 @@ int rc=dlg.Go(conn, NULL); if (rc != wxID_OK) return false; -conn = dlg.CreateConn(applicationname); +bool dummyRes; +conn = dlg.CreateConn(applicationname, dummyRes); } else if (cmdParser.Found(wxT(qc), connstr)) { Index: include/dlg/dlgSelectConnection.h === --- include/dlg/dlgSelectConnection.h (revision 8466) +++ include/dlg/dlgSelectConnection.h (working copy) @@ -24,7 +24,7 @@ ~dlgSelectConnection(); wxString GetHelpPage() const; pgServer *GetServer() { return remoteServer; } - pgConn *CreateConn(wxString applicationame); + pgConn *CreateConn(wxString applicationame, bool createdNew); pgConn *CreateConn(wxString server, wxString dbname, wxString username, int port, int sslmode, wxString applicationame, bool writeMRU = false); wxString GetServerName(); wxString GetDatabase(); Index: frm/frmQuery.cpp === --- frm/frmQuery.cpp (revision 8466) +++ frm/frmQuery.cpp (working copy) @@ -981,9 +981,10 @@ int rc=dlg.Go(conn, cbConnection); if (rc == wxID_OK) { +bool createdNewConn; wxString applicationname = _(pgAdmin - Query Tool); -conn = dlg.CreateConn(applicationname); -if (conn) +conn = dlg.CreateConn(applicationname, createdNewConn); +if (conn createdNewConn) { cbConnection-Insert(conn-GetName(), CreateBitmap(GetServerColour()), sel, (void*)conn); cbConnection-SetSelection(sel); Index: dlg/dlgSelectConnection.cpp === --- dlg/dlgSelectConnection.cpp (revision 8466) +++ dlg/dlgSelectConnection.cpp (working copy) @@ -84,6 +84,7 @@ return; cbDatabase-Clear(); +cbUsername-Clear(); int sel=cbServer-GetCurrentSelection(); if (sel = 0) @@ -169,12 +170,14 @@ EndModal(wxID_CANCEL); } -pgConn *dlgSelectConnection::CreateConn(wxString applicationname) +pgConn *dlgSelectConnection::CreateConn(wxString applicationname, bool createdNew) { /* gcc requires that we store this in temporary variables for some reason... */ wxString serv = cbServer-GetValue(); wxString db = cbDatabase-GetValue(); +createdNew = true; + long port = 0; if (serv.Find(':') 0) { @@ -188,7 +191,28 @@ wxString user = cbUsername-GetValue(); - return CreateConn(serv, db, user, port, 0, applicationname, true); +if (cbConnection) +{ +/* Check if selected combination already exists */ +for (unsigned int index = 0; index cbConnection-GetCount() - 1; index++) +{ +pgConn* conn = (pgConn*)cbConnection-GetClientData(index); +if (conn +conn-GetHost() == serv +conn-GetPort() == port +conn-GetUser() == user +conn-GetDbname() == db) +{ +createdNew
Re: [pgadmin-hackers] Ticket 118: Exclusion constraints
Le 12/07/2010 12:13, Magnus Hagander a écrit : On Sat, Jul 10, 2010 at 22:49, Guillaume Lelarge guilla...@lelarge.info wrote: Hi, At least, I finally did it :) This patch adds support for exclusion constraint (9.0 new feature). All examples from Magnus's talk (Beyond Unique) work with this patch. Anyway, this patch needs more work: 1. Displayed in both Constraints and Indexes I don't know why but each exclusion constraint is displayed two times. In the indexes node (where it doesn't belong), and in the constraints node (where it belongs). Any idea why? should not be too hard to find out, but I'm unable to find it right now. How do we do it with Primary Keys? It's the same thing - both an index and a constraint. There should be some code to hide it, thus similar code should be needed here. Actually, I tried to understand how it worked for primary keys and unique indexes. So far, I'm still wondering how it could hide them. 2. Need an icon I copied the unique constraint icon, but we really need another one for this specific constraint. 3. Probably some misunderstanding of the feature Should we propose all operators for the columns? or just the ones related to 1. the operator class 2. the column's type 3. something else? actually, I propose all of them. But I don't think this is what we should do. You need to show only commutative operators. That may be we need to filter on oid=oprcom in pg_operator - I'm not sure of that though, I didn't really investigate, but it looks like a reasonable thing. And yes, it should definitely be filtered on the column types. In Magnus's talk, I see that only GiST is supported right now as an index method. In PostgreSQL fine manual, it says that, to be usable, an index should provide the amgettuple method. And I see three of them support this method. Who's wrong? :) Trust The Fine Manual. Always remember that some of those things may also have changed since my talk :-) Sure. Thanks for your comments, I'll work on this at a later time. -- Guillaume http://www.postgresql.fr http://dalibo.com -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers