diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php
index 506baa8..23fc392 100644
--- a/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php
+++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php
@@ -43,6 +43,13 @@ class Schema extends DatabaseSchema {
   protected $maxIdentifierLength;
 
   /**
+   * A list of field types that support NOT NULL or NULL modifier.
+   *
+   * @var array
+   */
+  protected $modifier_supported = array('varchar', 'character', 'int', 'real', 'smallint', 'bigint', 'double precision', 'numeric');
+
+  /**
    * Make sure to limit identifiers according to PostgreSQL compiled in length.
    *
    * PostgreSQL allows in standard configuration no longer identifiers than 63
@@ -280,7 +287,7 @@ protected function createFieldSql($name, $spec) {
       unset($spec['not null']);
     }
 
-    if (in_array($spec['pgsql_type'], array('varchar', 'character', 'text')) && isset($spec['length'])) {
+    if (in_array($spec['pgsql_type'], array('varchar', 'character')) && isset($spec['length'])) {
       $sql .= '(' . $spec['length'] . ')';
     }
     elseif (isset($spec['precision']) && isset($spec['scale'])) {
@@ -291,7 +298,7 @@ protected function createFieldSql($name, $spec) {
       $sql .= " CHECK ($name >= 0)";
     }
 
-    if (isset($spec['not null'])) {
+    if (isset($spec['not null']) && in_array($spec['pgsql_type'], $this->modifier_supported)) {
       if ($spec['not null']) {
         $sql .= ' NOT NULL';
       }
