handling pg_typeof undefined
This commit is contained in:
@@ -52,6 +52,11 @@ module.exports = class BaseDataview {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
if (!result || !result.rows || !result.rows.length) {
|
||||
return callback(new Error('The column type could not be determined'));
|
||||
}
|
||||
|
||||
const pgType = result.rows[0].pg_typeof;
|
||||
callback(null, getPGTypeName(pgType));
|
||||
}, readOnlyTransaction);
|
||||
|
||||
Reference in New Issue
Block a user