FIx a hang in the query tool that could occur if a column type couldn't be determined. Fixes #1438

This commit is contained in:
Murtuza Zabuawala 2016-07-15 12:59:01 +01:00 committed by Dave Page
parent e94b14e7d7
commit d15dfac60f

View File

@ -1525,7 +1525,14 @@ define(
col_type = '';
label_text.innerText = c.name;
var type = pg_types[c.type_code][0];
var type = pg_types[c.type_code] ?
pg_types[c.type_code][0] :
// This is the case where user might
// have use casting so we will use type
// returned by cast function
pg_types[pg_types.length - 1][0] ?
pg_types[pg_types.length - 1][0] : 'unknown';
if (!is_primary_key)
col_type += ' ' + type;
else