Ticket #6371: osx.diff

File osx.diff, 7.7 KB (added by jyrki.wahlstedt@…, 15 years ago)

OS X modifications

  • pkg/win32/Makefile.am

     
    1010EXTRA_DIST = \
    1111    $(srcdir)/Make.bat \
    1212    $(srcdir)/README.txt \
     13    $(srcdir)/upgrade.bat \
    1314    $(srcdir)/resources/banner.bmp \
    1415    $(srcdir)/resources/new.bmp \
    1516    $(srcdir)/resources/up.bmp \
  • pkg/win32/upgrade.bat

     
     1@echo off
     2cls
     3echo This file will upgrade your pgAdmin III installation.
     4echo.
     5echo You must have pgAdmin III v1.4.x installed
     6echo from the official MSI installation to use this upgrade path.
     7echo.
     8echo If pgAdmin III or any of it's components are in use
     9echo a reboot will be required once the upgrade is completed.
     10echo.
     11echo.
     12echo Press Ctrl-C to abort the upgrade or
     13pause
     14
     15REM Parameters described:
     16REM  /i pgadmin3.msi           - pick MSI file to install. All properties
     17REM                              will be read from existing installation.
     18REM  REINSTALLMODE=vamus       - reinstall all files, regardless of version.
     19REM                              This makes sure documentation and other
     20REM                              non-versioned files are updated.
     21REM  REINSTALL=ALL             - Reinstall all features that were previously
     22REM                              installed with the new version.
     23msiexec /i pgadmin3.msi REINSTALLMODE=vamus REINSTALL=ALL /qr
  • src/include/ctl/ctlComboBox.h

     
    2525public:
    2626    ctlComboBoxFix(wxWindow *wnd, int id, wxPoint pos, wxSize siz, long attr);
    2727
    28 #if wxCHECK_VERSION(2,6,2)
     28#if wxCHECK_VERSION(2,6,2) && !defined(__WXMAC__)
    2929    // we have GetCurrentSelection() in wxChoice, implementing the old GetSelection() semantics
    3030#else
    3131    int GetCurrentSelection() const { return wxComboBox::GetSelection(); }
     
    5252#ifdef __WXMSW__
    5353    wxString GetValue() const { return wxGetWindowText(GetHwnd()); }
    5454#endif
    55 
    56 
    57 private:
    58     // to prevent using it; use GetCurrentSelection() instead
    59     int GetSelection() const { return -1; }
    6055};
    6156
    6257class ctlComboBox : public ctlComboBoxFix
  • src/schema/pgLanguage.cpp

     
    4747        if (GetTrusted())
    4848            sql += wxT("TRUSTED ");
    4949        sql += wxT("PROCEDURAL LANGUAGE '") + GetName()
    50             +  wxT("'\n  HANDLER ") + GetHandlerProc() + wxT(";\n")
     50            +  wxT("'\n  HANDLER ") + GetHandlerProc();
     51
     52        if (!GetValidatorProc().IsEmpty())
     53            sql += wxT("\n  VALIDATOR ") + GetValidatorProc();
     54       
     55        sql += wxT(";\n")
    5156            +  GetGrant(wxT("X"), wxT("LANGUAGE ") + GetQuotedFullIdentifier());
    5257
    5358    }
  • src/schema/pgSchema.cpp

     
    163163
    164164    pgSet *schemas = collection->GetDatabase()->ExecuteSet(
    165165        wxT("SELECT CASE WHEN nspname LIKE 'pg\\_temp\\_%%' THEN 1\n")
    166         wxT("            WHEN (nsp.oid<") + NumToStr(collection->GetServer()->GetLastSystemOID()) +
    167                          wxT(" OR nspname like 'pg\\_%') AND nspname != 'public' THEN 0\n")
     166        wxT("            WHEN (nspname LIKE 'pg\\_%' OR nspname = 'information_schema') THEN 0\n")
    168167        wxT("            ELSE 3 END AS nsptyp,\n")
    169168        wxT("       nsp.nspname, nsp.oid, pg_get_userbyid(nspowner) AS namespaceowner, nspacl, description,")
    170169        wxT("       has_schema_privilege(nsp.oid, 'CREATE') as cancreate\n")
  • src/schema/pgObject.cpp

     
    162162bool pgObject::UpdateIcon(ctlTree *browser)
    163163{
    164164    int icon=GetIconId();
    165     if (browser->GetItemImage(GetId(), wxTreeItemIcon_Normal) != icon)
     165    if (GetId() && browser->GetItemImage(GetId(), wxTreeItemIcon_Normal) != icon)
    166166    {
    167167        browser->SetItemImage(GetId(), GetIconId(), wxTreeItemIcon_Normal);
    168168        browser->SetItemImage(GetId(), GetIconId(), wxTreeItemIcon_Selected);
  • src/slony/include/slSubscription.h

     
    5959
    6060 
    6161    bool CanCreate();
     62    bool CanDrop();
    6263
    6364    bool DropObject(wxFrame *frame, ctlTree *browser, bool cascaded);
    6465    wxString GetSql(ctlTree *browser);
  • src/slony/slSubscription.cpp

     
    6161}
    6262
    6363
     64bool slSubscription::CanDrop()
     65{
     66    return GetReceiverId() == GetCluster()->GetLocalNodeID();
     67}
     68
     69
    6470wxString slSubscription::GetSql(ctlTree *browser)
    6571{
    6672    if (sql.IsNull())
  • src/slony/slNode.cpp

     
    171171                wxT("       st_last_event_ts - st_last_received_ts AS eventlag,")
    172172                wxT("       ev_seqno, ev_type || ' ' || COALESCE(ev_data1, '') AS hanging\n")
    173173                wxT("  FROM ") + GetCluster()->GetSchemaPrefix() + wxT("sl_status\n")
    174                 wxT("  LEFT JOIN ") + GetCluster()->GetSchemaPrefix() + wxT("sl_event ON ev_seqno=\n")
     174                wxT("  LEFT JOIN ") + GetCluster()->GetSchemaPrefix() + wxT("sl_event ON ev_origin=st_origin AND ev_seqno=\n")
    175175                wxT("         (SELECT MIN(ev_seqno) FROM ") + GetCluster()->GetSchemaPrefix() + wxT("sl_event WHERE ev_seqno > st_last_received)\n")
    176176                wxT(" WHERE st_origin = ") + NumToStr(GetCluster()->GetLocalNodeID()) + wxT("\n")
    177177                wxT("   AND st_received = ") + NumToStr(GetSlId()));
     
    331331        wxT("       CASE WHEN st_lag_num_events > 0 THEN st_last_event_ts - st_last_received_ts END AS eventlag,")
    332332        wxT("       ev_seqno, ev_type || ' ' || COALESCE(ev_data1, '') AS hanging\n")
    333333        wxT("  FROM ") + GetCluster()->GetSchemaPrefix() + wxT("sl_status\n")
    334         wxT("  LEFT JOIN ") + GetCluster()->GetSchemaPrefix() + wxT("sl_event ON ev_seqno=\n")
     334        wxT("  LEFT JOIN ") + GetCluster()->GetSchemaPrefix() + wxT("sl_event ON ev_origin=st_origin AND ev_seqno=\n")
    335335        wxT("         (SELECT MIN(ev_seqno) FROM ") + GetCluster()->GetSchemaPrefix() + wxT("sl_event WHERE ev_seqno > st_last_received)\n")
    336336        wxT(" WHERE st_origin = ") + NumToStr(GetCluster()->GetLocalNodeID()));
    337337