From 6b9a951fdbeb419e1313dd0bbee37f6090b5657e Mon Sep 17 00:00:00 2001 From: Satyajit Sarangi Date: Mon, 10 Aug 2020 11:15:21 +0530 Subject: [PATCH] Added support for int, bigint and text array dataypes for Postgres. _TYPE in Postgres represent array types. eg. _INT4, _INT8, _TEXT --- backends/sqldb.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backends/sqldb.go b/backends/sqldb.go index dd828a1..6d5749f 100644 --- a/backends/sqldb.go +++ b/backends/sqldb.go @@ -259,6 +259,13 @@ func (s *sqlDB) createTableSchema(cols []string, colTypes []*sql.ColumnType) ins if s.dbType != dbTypePostgres { typ = "TEXT" } + // _INT4, _INT8, _TEXT represent array types in Postgres + case "_INT4": // Postgres + typ = "_INT4" + case "_INT8": // Postgres + typ = "_INT8" + case "_TEXT": // Postgres + typ = "_TEXT" default: typ = "TEXT" }