Skip to content

Sqlc does not support utf8 for sql identifiers #3960

Open
@pdenapo

Description

@pdenapo

Version

1.25.0

What happened?

Sqlc does not support identifiers with utf8 characters. This are commonly used in non-English languages:

Consider the following schema:

CREATE TABLE autores (
  id  integer PRIMARY KEY,
  nombre text      NOT NULL,
  biografía  text
);

This is legal for instance in sqlite3. But sqlc version 1.25.0 gives

sqlc generate failed.

line 4:9 extraneous input 'í' expecting {')', ','}

package

schema.sql:1:1: extraneous input 'í' expecting {')', ','}

(and later versions crash at the playground with internal server error)

Relevant log output

Database schema

CREATE TABLE autores (
  id  integer PRIMARY KEY,
  nombre text      NOT NULL,
  biografía  text
)

SQL queries

Configuration

Playground URL

https://play.sqlc.dev/p/9a52c773b7cf96b50221eea4a586818be6cc06eb2b9e219e3013c95c720759da

What operating system are you using?

Linux

What database engines are you using?

SQLite

What type of code are you generating?

Go

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions