Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/dialect/dialect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func TestPostgresDialect(t *testing.T) {
if got := d.Name(); got != "postgres" {
t.Fatalf("unexpected name: %q", got)
}
if got := d.Features(); got != FeatureInsertReturning|FeatureUpdateReturning|FeatureDeleteReturning|FeatureOffset|FeatureUpsert|FeatureCTE|FeatureDefaultPlaceholder|FeatureSavepoint|FeatureSelectLocking|FeatureNullsOrder {
if got := d.Features(); got != FeatureInsertReturning|FeatureUpdateReturning|FeatureDeleteReturning|FeatureOffset|FeatureUpsert|FeatureCTE|FeatureDefaultPlaceholder|FeatureSavepoint|FeatureSelectLocking|FeatureNullsOrder|FeatureSelectDistinctOn {
t.Fatalf("unexpected features: %b", got)
}
if got := d.QuoteIdentifier(`user"name`); got != `"user""name"` {
Expand Down
1 change: 1 addition & 0 deletions pkg/dialect/feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const (
FeatureSavepoint
FeatureSelectLocking
FeatureNullsOrder
FeatureSelectDistinctOn
)

// HasFeature reports whether a feature set includes the requested capability.
Expand Down
3 changes: 2 additions & 1 deletion pkg/dialect/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ func (d *PostgresDialect) Features() Feature {
FeatureDefaultPlaceholder |
FeatureSavepoint |
FeatureSelectLocking |
FeatureNullsOrder
FeatureNullsOrder |
FeatureSelectDistinctOn
}

// QuoteIdentifier quotes identifiers with double quotes.
Expand Down
Loading