Hi Colin,
On Fri, 2012-04-20 at 13:15 +0200, Guillaume Lelarge wrote:
> On Wed, 2012-04-11 at 17:13 -0400, Colin Beckingham wrote:
> >
> > On 04/11/2012 04:38 PM, Colin Beckingham wrote:
> > > Guillaume, I see the missing column name in index-properties has been
> > > fixed. Thanks.
> > >
> > > However the column name appears to be truncated one char too early;
> > > bookid becomes booki and authid becomes authi. Seems to be consistent
> > > across databases.
> >
> > I am confusing Constraints and Indexes again. The column name is still
> > missing from _Constraints_, the name is present in _Indexes_ but
> > truncated 1 char.
> >
>
> 'k. Actually, as far as I can tell, it also happens with wxWidgets 2.8.
> It also happens on 1.14. I'm working on it.
>
Can you try the attached patch, please?
--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com
diff --git a/pgadmin/dlg/dlgIndex.cpp b/pgadmin/dlg/dlgIndex.cpp
index 02cbb53..4ecbe40 100644
--- a/pgadmin/dlg/dlgIndex.cpp
+++ b/pgadmin/dlg/dlgIndex.cpp
@@ -375,7 +375,7 @@ int dlgIndex::Go(bool modal)
if (pos > 0)
{
opclassDef = colDef.Mid(pos + 1);
- colDef = colDef.Mid(0, pos - 1);
+ colDef = colDef.Mid(0, pos);
}
else
opclassDef = wxEmptyString;
@@ -397,7 +397,7 @@ int dlgIndex::Go(bool modal)
{
colDef = colRest;
opclassDef = colDef.Mid(pos + 1);
- colDef = colDef.Mid(0, pos - 1);
+ colDef = colDef.Mid(0, pos);
}
else
opclassDef = wxEmptyString;
diff --git a/pgadmin/dlg/dlgIndexConstraint.cpp b/pgadmin/dlg/dlgIndexConstraint.cpp
index 79cef2f..a5b1a77 100644
--- a/pgadmin/dlg/dlgIndexConstraint.cpp
+++ b/pgadmin/dlg/dlgIndexConstraint.cpp
@@ -182,7 +182,7 @@ int dlgIndexConstraint::Go(bool modal)
if (pos > 0)
{
opclassDef = colDef.Mid(pos + 1);
- colDef = colDef.Mid(0, pos - 1);
+ colDef = colDef.Mid(0, pos);
}
else
opclassDef = wxEmptyString;
@@ -212,9 +212,8 @@ int dlgIndexConstraint::Go(bool modal)
int pos = colDef.First(wxT(" "));
if (pos > 0)
{
- colDef = colRest;
opclassDef = colDef.Mid(pos + 1);
- colDef = colDef.Mid(0, pos - 1);
+ colDef = colDef.Mid(0, pos);
}
else
opclassDef = wxEmptyString;
--
Sent via pgadmin-support mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-support