Index: pgadmin/ctl/ctlSQLResult.cpp =================================================================== --- pgadmin/ctl/ctlSQLResult.cpp (revision 6969) +++ pgadmin/ctl/ctlSQLResult.cpp (working copy) @@ -300,6 +300,9 @@ wxString sqlResultTable::GetValue(int row, int col) { + wxString value; + long maxColSize = settings->GetMaxColSize(); + if (thread && thread->DataValid()) { if (col >= 0) @@ -308,10 +311,16 @@ if (settings->GetIndicateNull() && thread->DataSet()->IsNull(col)) return wxT(""); else - return thread->DataSet()->GetVal(col); + value = thread->DataSet()->GetVal(col); } else - return thread->DataSet()->ColName(col); + value = thread->DataSet()->ColName(col); + + // Truncate the value if required + if (maxColSize && (long)value.Length() > maxColSize) + value = value.Left(maxColSize) + wxT("..."); + + return value; } return wxEmptyString; }