Skip to content

sql: lib/pq confused by unicode characters in text[], while psql is OK with them #31872

Closed
@dmkret

Description

@dmkret

russian character \u0422 'Т' (capital te) not saved well if it's inside of a string array.

To Reproduce

import "github.com/lib/pq"
...
rows, err := db.Query("SELECT ARRAY ['У, 'Л', 'Т']")
for rows.Next() {
    var value pq.StringArray
    rows.Scan(&value)
    fmt.Println(value)
}

output for cockroachdb> {"У", "Л" ,"\u0422"}
output for postgresql> {"У", "Л", "Т"}

Environment:

  • CockroachDB version: 2.0.6
  • Client app: cockroach sql, golang: pq

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-sql-pgwirepgwire protocol issues.C-investigationFurther steps needed to qualify. C-label will change.O-communityOriginated from the community

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions