[pgadmin-hackers] View data - aborting randomly and no result
Hi 1. When I view the data of a table, there is no result. (blank window and status is "aborting") 2. When I execute the query, the result is blank. The status is ":". Both the behaviours are not consistent. I am using pgadmin3-1.6.2/wxWidgets2.8.0 The platform is Solaris10/x86. Any idea?? Thanks Dhanaraj ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [pgadmin-hackers] DB restrict patch of connection
Hi Dave. Yes, please revert those changes. The code is correct as it was, because it allows you to specify things like: datname IN ('foo, baa') or datdba = (SELECT usesysid FROM pg_shadow WHERE usename = CURRENT_USER) That doesn't work any more :-( Oh sorry, I arrange an idea again. Regards, Hiroshi Saito ---(end of broadcast)--- TIP 6: explain analyze is your friend
[pgadmin-hackers] SVN Commit by hiroshi: r5870 - in trunk/pgadmin3/pgadmin: dlg schema
Author: hiroshi Date: 2007-01-16 17:10:33 + (Tue, 16 Jan 2007) New Revision: 5870 Revision summary: http://svn.pgadmin.org/cgi-bin/viewcvs.cgi/?rev=5870&view=rev Log: revert changes. Modified: trunk/pgadmin3/pgadmin/dlg/dlgDatabase.cpp trunk/pgadmin3/pgadmin/dlg/dlgServer.cpp trunk/pgadmin3/pgadmin/schema/pgDatabase.cpp trunk/pgadmin3/pgadmin/schema/pgSchema.cpp ---(end of broadcast)--- TIP 6: explain analyze is your friend
[pgadmin-hackers] SVN Commit by hiroshi: r5869 - in branches/REL-1_6_0_PATCHES/pgadmin3/src: dlg schema
Author: hiroshi Date: 2007-01-16 17:09:19 + (Tue, 16 Jan 2007) New Revision: 5869 Revision summary: http://svn.pgadmin.org/cgi-bin/viewcvs.cgi/?rev=5869&view=rev Log: revert changes. Modified: branches/REL-1_6_0_PATCHES/pgadmin3/src/dlg/dlgDatabase.cpp branches/REL-1_6_0_PATCHES/pgadmin3/src/dlg/dlgServer.cpp branches/REL-1_6_0_PATCHES/pgadmin3/src/schema/pgDatabase.cpp branches/REL-1_6_0_PATCHES/pgadmin3/src/schema/pgSchema.cpp ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate
[pgadmin-hackers] pgAdmin III 1.6.2 debian packages for etch uploaded.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dear friends, I've just uploaded pgAdmin III 1.6.2 for the upcoming debian/etch to our developer's host. It should reach PostgreSQL mirrors in the next hours/days. Please note that these packages are mostly statically linked against wxWidgets 2.8. Sarge issue: - I'm not providing debian/sarge packages at the moment as I need to decide what to do concerning old libraries such as libxml2 (>=2.6.18 required but 2.6.16 shipped with sarge). Regards, Raphaël -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFrKtVx3NpDPptARMRAoA5AJ9HGcmanIBWLsKnBPCzEQelBvQ5OgCfWLYL w43f2FrXpb519I7v4n6RbRQ= =ovnF -END PGP SIGNATURE- ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
[pgadmin-hackers] PgAdmin Wishlist: export to clipboard
I allready can export query results to a text file as CSV. With ...another database and another tool... I often use the "export to clipboard" functionality for exporting a small amount of query results. (i.e. "distinct values in the "title" field of addresses" Possible placement would be within the "Export" Dialog, make a radio select ( ) Filename [filenameselector] ( ) to Clipboard as wx has a wx.Clipboard-class -> that may be doable, or? Best wishes Harald -- GHUM Harald Massa persuadere et programmare Harald Armin Massa Reinsburgstraße 202b 70197 Stuttgart 0173/9409607 - Python: the only language with more web frameworks than keywords.
Re: [pgadmin-hackers] DB restrict patch of connection
Hiroshi Saito wrote: > Hi Dave. > >> It works fine for me. You must enter something like: > :-) > >> >> datname != 'template1' >> >> It's more to type, but it's much more flexible. > > Um, sorry I don't understand it well. probably, It is necessary to be > able to select it at the display mode of the system object. The change > in the option will be able to be selected though it doesn't appear at > all when it is not the display mode. I think that it should not do a > fixed restriction of logic. Is my point wrong? Yes, please revert those changes. The code is correct as it was, because it allows you to specify things like: datname IN ('foo, baa') or datdba = (SELECT usesysid FROM pg_shadow WHERE usename = CURRENT_USER) That doesn't work any more :-( Regards, Dave. ---(end of broadcast)--- TIP 6: explain analyze is your friend
Re: [pgadmin-hackers] Enable/disable trigger path
Guillaume Lelarge wrote: > Hi all, > > Here is my first patch to support enable/disable trigger. This > functionnality is available since release 8.1 of PostgreSQL. Im' not > really happy with my code. I have some code to enable a trigger and some > code to disable it. I think it would be better to merge them since they > are pretty close. For example, I use two menus (Enable trigger and > Disable trigger). It would be better to use just one but I don't know > what to do : > * rename the menu's title > * use a checked menu. > > Or perhaps two menus are just fine. Any advice on this ? > > Also, I would like to add enable/disable all triggers but I don't know > where I should put the menu item : on the table name's contextual menu ? > on the "Triggers" contextual menu ? > > Thanks for any tips on this matter. Bullet pointed tips, purely because that's how they escaped from my brain :-) - This should be on the Tools menu, not the View menu. - Use a single factory, and a check/uncheck menu option. See the changes I made to the pg_stattuple stuff as an example of a check option. - The menu option should probably become something like 'Trigger enabled?' - pgTrigger::Enable/DisableTrigger should manage the state of the enabled flag themselves - you should not have to change that from the factory. - If Enable/Disable trigger don't work for some reason, StartDialog should exit without doing anything else as a general rule. Otherwise it looks OK though - certainly looks like you've got the hang of the factories :-) Regards, Dave. ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
[pgadmin-hackers] Enable/disable trigger path
Hi all, Here is my first patch to support enable/disable trigger. This functionnality is available since release 8.1 of PostgreSQL. Im' not really happy with my code. I have some code to enable a trigger and some code to disable it. I think it would be better to merge them since they are pretty close. For example, I use two menus (Enable trigger and Disable trigger). It would be better to use just one but I don't know what to do : * rename the menu's title * use a checked menu. Or perhaps two menus are just fine. Any advice on this ? Also, I would like to add enable/disable all triggers but I don't know where I should put the menu item : on the table name's contextual menu ? on the "Triggers" contextual menu ? Thanks for any tips on this matter. Regards. -- Guillaume. Index: pgadmin/include/schema/pgTrigger.h === --- pgadmin/include/schema/pgTrigger.h (révision 5866) +++ pgadmin/include/schema/pgTrigger.h (copie de travail) @@ -57,6 +57,8 @@ bool DropObject(wxFrame *frame, ctlTree *browser, bool cascaded); wxString GetSql(ctlTree *browser); pgObject *Refresh(ctlTree *browser, const wxTreeItemId item); +bool EnableTrigger(); +bool DisableTrigger(); bool HasStats() { return false; } bool HasDepends() { return true; } Index: pgadmin/include/dlg/dlgTrigger.h === --- pgadmin/include/dlg/dlgTrigger.h(révision 5866) +++ pgadmin/include/dlg/dlgTrigger.h(copie de travail) @@ -39,4 +39,21 @@ }; +class enableTriggerFactory : public contextActionFactory +{ +public: +enableTriggerFactory(menuFactoryList *list, wxMenu *mnu, wxToolBar *toolbar); +wxWindow *StartDialog(frmMain *form, pgObject *obj); +bool CheckEnable(pgObject *obj); +}; + + +class disableTriggerFactory : public contextActionFactory +{ +public: +disableTriggerFactory(menuFactoryList *list, wxMenu *mnu, wxToolBar *toolbar); +wxWindow *StartDialog(frmMain *form, pgObject *obj); +bool CheckEnable(pgObject *obj); +}; + #endif Index: pgadmin/frm/frmMain.cpp === --- pgadmin/frm/frmMain.cpp (révision 5866) +++ pgadmin/frm/frmMain.cpp (copie de travail) @@ -63,6 +63,7 @@ #include "dlg/dlgServer.h" #include "dlg/dlgDatabase.h" #include "dlg/dlgTable.h" +#include "dlg/dlgTrigger.h" #include "dlg/dlgServer.h" #include "slony/dlgRepCluster.h" #include "slony/dlgRepSet.h" @@ -258,6 +259,8 @@ actionFactory *refFact=new refreshFactory(menuFactories, viewMenu, toolBar); new countRowsFactory(menuFactories, viewMenu, 0); new executePgstattupleFactory(menuFactories, viewMenu, 0); +new enableTriggerFactory(menuFactories, viewMenu, 0); +new disableTriggerFactory(menuFactories, viewMenu, 0); //-- Index: pgadmin/schema/pgTrigger.cpp === --- pgadmin/schema/pgTrigger.cpp(révision 5866) +++ pgadmin/schema/pgTrigger.cpp(copie de travail) @@ -48,6 +48,20 @@ } +bool pgTrigger::EnableTrigger() +{ +wxString sql = wxT("ALTER TABLE ") + GetQuotedFullTable() + wxT(" ENABLE TRIGGER ") + GetQuotedIdentifier(); +return GetDatabase()->ExecuteVoid(sql); +} + + +bool pgTrigger::DisableTrigger() +{ +wxString sql = wxT("ALTER TABLE ") + GetQuotedFullTable() + wxT(" DISABLE TRIGGER ") + GetQuotedIdentifier(); +return GetDatabase()->ExecuteVoid(sql); +} + + void pgTrigger::SetDirty() { if (expandedKids) Index: pgadmin/dlg/dlgTrigger.cpp === --- pgadmin/dlg/dlgTrigger.cpp (révision 5866) +++ pgadmin/dlg/dlgTrigger.cpp (copie de travail) @@ -15,6 +15,7 @@ // App headers #include "pgAdmin3.h" #include "utils/misc.h" +#include "frm/frmMain.h" #include "utils/pgDefs.h" #include "dlg/dlgTrigger.h" @@ -208,3 +209,58 @@ EnableOK(enable); } } + +enableTriggerFactory::enableTriggerFactory(menuFactoryList *list, wxMenu *mnu, wxToolBar *toolbar) : contextActionFactory(list) +{ +mnu->Append(id, _("&Enable trigger"), _("Enable trigger.")); +} + + +wxWindow *enableTriggerFactory::StartDialog(frmMain *form, pgObject *obj) +{ +if (((pgTrigger*)obj)->EnableTrigger()) +((pgTrigger*)obj)->iSetEnabled(true); + +wxTreeItemId item=form->GetBrowser()->GetSelection(); +{ +obj->ShowTreeDetail(form->GetBrowser(), 0, form->GetProperties()); +form->GetMenuFactories()->CheckMenu(obj, form->GetMenuBar(), form->GetToolBar()); +} + +return 0; +} + + +bool enableTriggerFactory::CheckEnable(pgObject *obj) +{ +return obj && obj->IsCreatedBy(triggerFactory) && ! ((pgTrigger*)obj)->GetEnabled() + && ((pgTrigger*)obj)->GetConnection()->BackendMinimumVersion(8, 1); +} + +disableTriggerFactory::disableTriggerFactory(menuF