diff --git a/postgresql/collection.go b/postgresql/collection.go
index 04beea90d68aea6a2f3f2bfcbc0d27c252d071a0..892b69d037c5b6060b474846dec5774d5ba976d7 100644
--- a/postgresql/collection.go
+++ b/postgresql/collection.go
@@ -236,9 +236,9 @@ func (self *Table) Append(item interface{}) (interface{}, error) {
 
 	var extra string
 
-	if _, ok := self.ColumnTypes[self.PrimaryKey]; ok == true {
-		extra = fmt.Sprintf(`RETURNING %s`, self.PrimaryKey)
-	}
+	//if _, ok := self.ColumnTypes[self.PrimaryKey]; ok == true {
+	//	extra = fmt.Sprintf(`RETURNING %s`, self.PrimaryKey)
+	//}
 
 	row, err := self.source.doQueryRow(sqlgen.Statement{
 		Type:    sqlgen.SqlInsert,
diff --git a/postgresql/database.go b/postgresql/database.go
index 25672ed83355123bb75bd591b4f824f2f092d146..a57fd2fb534657f583ac8fa85060244dc46f1668 100644
--- a/postgresql/database.go
+++ b/postgresql/database.go
@@ -25,7 +25,6 @@ import (
 	"database/sql"
 	"fmt"
 	"os"
-	"reflect"
 	"regexp"
 	"strings"
 
@@ -60,8 +59,7 @@ type Source struct {
 }
 
 type columnSchema_t struct {
-	ColumnName string `db:"column_name"`
-	DataType   string `db:"data_type"`
+	Name string `db:"column_name"`
 }
 
 func debugEnabled() bool {
@@ -398,8 +396,6 @@ func (self *Source) Collection(names ...string) (db.Collection, error) {
 		names:  names,
 	}
 
-	col.PrimaryKey = `id`
-
 	columns_t := []columnSchema_t{}
 
 	for _, name := range names {
@@ -430,44 +426,14 @@ func (self *Source) Collection(names ...string) (db.Collection, error) {
 				return nil, err
 			}
 
-			if err = col.FetchRows(&columns_t, rows); err != nil {
+			if err = sqlutil.FetchRows(rows, &columns_t); err != nil {
 				return nil, err
 			}
 
-			col.ColumnTypes = make(map[string]reflect.Kind, len(columns_t))
+			col.Columns = make([]string, 0, len(columns_t))
 
 			for _, column := range columns_t {
-
-				column.ColumnName = strings.ToLower(column.ColumnName)
-				column.DataType = strings.ToLower(column.DataType)
-
-				results := columnPattern.FindStringSubmatch(column.DataType)
-
-				// Default properties.
-				dextra := ""
-				dtype := `varchar`
-
-				dtype = results[1]
-
-				if len(results) > 3 {
-					dextra = results[3]
-				}
-
-				ctype := reflect.String
-
-				// Guessing datatypes.
-				switch dtype {
-				case `smallint`, `integer`, `bigint`, `serial`, `bigserial`:
-					if dextra == `unsigned` {
-						ctype = reflect.Uint64
-					} else {
-						ctype = reflect.Int64
-					}
-				case `real`, `double`:
-					ctype = reflect.Float64
-				}
-
-				col.ColumnTypes[column.ColumnName] = ctype
+				col.Columns = append(col.Columns, strings.ToLower(column.Name))
 			}
 
 		}
diff --git a/postgresql/result.go b/postgresql/result.go
index ea8cb0d9365cd90821534ccb6347b98f87d899b4..5976113b1932c1c154e340499daecc0f9439244b 100644
--- a/postgresql/result.go
+++ b/postgresql/result.go
@@ -28,6 +28,7 @@ import (
 
 	"upper.io/db"
 	"upper.io/db/util/sqlgen"
+	"upper.io/db/util/sqlutil"
 )
 
 type counter_t struct {
@@ -148,7 +149,7 @@ func (self *Result) All(dst interface{}) error {
 	defer self.Close()
 
 	// Fetching all results within the cursor.
-	err = self.table.T.FetchRows(dst, self.cursor)
+	err = sqlutil.FetchRows(self.cursor, dst)
 
 	return err
 }
@@ -176,7 +177,7 @@ func (self *Result) Next(dst interface{}) error {
 		return err
 	}
 
-	err = self.table.T.FetchRow(dst, self.cursor)
+	err = sqlutil.FetchRow(self.cursor, dst)
 	if err != nil {
 		self.Close()
 		return err
@@ -251,7 +252,9 @@ func (self *Result) Count() (uint64, error) {
 	defer rows.Close()
 
 	dst := counter_t{}
-	self.table.T.FetchRow(&dst, rows)
+	if err = sqlutil.FetchRow(rows, &dst); err != nil {
+		return 0, err
+	}
 
 	return dst.Total, nil
 }