Index: PostgreSQLBuilder.java
===================================================================
--- PostgreSQLBuilder.java	(revision 444)
+++ PostgreSQLBuilder.java	(revision 445)
@@ -33,12 +33,8 @@
 
 public class PostgreSQLBuilder extends JDBCSQLBuilderBase {
 
-    private final JDBCHelper helper;
-
     public PostgreSQLBuilder(JDBCHelper helper) {
-        super();
-        
-        this.helper = helper;
+        super(helper);
               
         config.set(SQLConfig.default_schema, "public");
         config.set(SQLConfig.allowAutomaticValues, true);
@@ -88,6 +84,43 @@
             return sqls;
         }        
     }
+    protected class PostgreSQLCreateIndexBuilder extends CreateIndexBuilderBase {
+
+        @Override
+        public List<String> toStrings() {
+            StringBuilder builder = new StringBuilder();
+            builder.append("CREATE ");
+//            if( this.isUnique ) {
+//                builder.append("UNIQUE ");
+//            }
+            builder.append("INDEX ");
+            if( this.ifNotExist ) {
+                builder.append("IF NOT EXISTS ");
+            }
+            builder.append(identifier(this.indexName));
+            builder.append(" ON ");
+            builder.append(this.table.toString());
+            if( this.isSpatial ) {
+                builder.append(" USING GIST ");
+            }
+            builder.append(" ( ");
+            boolean is_first_column = true;
+            for( String column : this.columns) {
+                if( is_first_column ) {
+                    is_first_column = false;
+                } else {
+                    builder.append(", ");
+                }
+                builder.append(column);
+            }
+            builder.append(" )");
+            
+            List<String> sqls = new ArrayList<>();
+            sqls.add(builder.toString());
+            return sqls;
+        }
+        
+    }
     
     protected class PostgreSQLCreateTableBuilder extends CreateTableBuilderBase {
 
@@ -140,7 +173,7 @@
             builder.append(" )");
             sqls.add(builder.toString());
 
-            String AddGeometryColumn = "SELECT AddGeometryColumn({0} , {1} , {2}, {3,number,#######} , {4} , {5}, {6})";
+            String AddGeometryColumn = "SELECT AddGeometryColumn({0} , {1} , {2}, {3} , {4} , {5}, {6})";
             for (ColumnDescriptorBuilderBase column : columns) {
                 if( column.isGeometry() ) {
                     String sql = MessageFormat.format(
@@ -156,28 +189,6 @@
                     sqls.add(sql);
                 }
             }
-            for (ColumnDescriptorBuilderBase column : columns) {
-                if( column.isIndexed() ) {
-                    String sql;
-                    String name = "idx_" + this.table().getName() + "_" + column.getName();
-                    if( column.isGeometry() ) {
-                        sql = MessageFormat.format(
-                            config.getString(SQLConfig.CREATE_INDEX_name_ON_table_USING_GIST_column),
-                            name,
-                            this.table().toString(),
-                            column.getName()
-                        );
-                    } else {
-                        sql = MessageFormat.format(
-                            config.getString(SQLConfig.CREATE_INDEX_name_ON_table_column),
-                            name,
-                            this.table().toString(),
-                            column.getName()
-                        );
-                    }
-                    sqls.add(sql);
-                }
-            }                        
             return sqls;
         }
     }
@@ -269,6 +280,10 @@
     public String bytearray(byte[] data) {
         return "decode('"+bytearray_hex(data)+"','hex')";
     }
+
+    public PostgreSQLHelper getHelper() {
+        return (PostgreSQLHelper) helper;
+    }
     
     @Override
     protected CreateTableBuilder createCreateTableBuilder() {
@@ -276,6 +291,11 @@
     }
 
     @Override
+    protected CreateIndexBuilder createCreateIndexBuilder() {
+        return new PostgreSQLCreateIndexBuilder();
+    }
+
+    @Override
     protected SelectBuilder createSelectBuilder() {
         return new PostgreSQLSelectBuilderBase();
     }
@@ -283,5 +303,6 @@
     @Override
     protected UpdateTableStatisticsBuilder createUpdateTableStatisticsBuilder() {
         return new PostgreSQLUpdateTableStatisticsBuilderBase();
-    }    
+    }       
+   
 }
