Update contrib/drivers/pgsql/pgsql_do_insert.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
John Guo
2025-12-08 15:00:52 +08:00
committed by GitHub
parent b7cd39a8b8
commit d8fa0a7922

View File

@ -82,7 +82,7 @@ func (d *Driver) getPrimaryKeys(ctx context.Context, table string) ([]string, er
var primaryKeys []string
for _, field := range tableFields {
if gstr.Equal(field.Key, "PRI") {
if gstr.Equal(field.Key, "pri") {
primaryKeys = append(primaryKeys, field.Name)
}
}