Skip to content

Sqlc generating string field instead of custom type #1259

Open
@gionapaolini

Description

@gionapaolini

Version

1.10.0

What happened?

I created a new postgresql type:

CREATE TYPE "location_coordinates" AS (
    longitude       double precision, 
    latitude        double precision
);

And then I use it in a table:

CREATE TABLE "table" (
  ...
  "location_coordinates" location_coordinates NOT NULL,
  ...
);

Generated model contains string instead of generating the proper type

type Table struct {
	...
	LocationCoordinates string
	...
}

Playground URL

https://play.sqlc.dev/p/2dbb77a8eb5cd8aaa6ad076785d53033bfc814bbbdb2806d719403f2aeaf992b

What operating system are you using?

Windows

What database engines are you using?

PostgreSQL

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