Skip to content

Commit 418d928

Browse files
committed
Do not force convert Postgres's table name and field name to lower case. Fixes #119, #192.
To use lower case table name, do something like this: dbmap.AddTableWithName(Post{}, "posts") To use lower case field name, specify the field name in type definition: type Post struct { Title string `db:"title"` }
1 parent 0c9bc09 commit 418d928

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

dialect_postgres.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ func (d PostgresDialect) InsertAutoIncrToTarget(exec SqlExecutor, insertSql stri
123123
}
124124

125125
func (d PostgresDialect) QuoteField(f string) string {
126-
return `"` + strings.ToLower(f) + `"`
126+
return `"` + f + `"`
127127
}
128128

129129
func (d PostgresDialect) QuotedTableForQuery(schema string, table string) string {

0 commit comments

Comments
 (0)