Skip to content

Sqlc generating string field instead of custom type #1259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gionapaolini opened this issue Oct 30, 2021 · 1 comment
Open

Sqlc generating string field instead of custom type #1259

gionapaolini opened this issue Oct 30, 2021 · 1 comment

Comments

@gionapaolini
Copy link

gionapaolini commented Oct 30, 2021

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

@gionapaolini gionapaolini added bug Something isn't working triage New issues that hasn't been reviewed labels Oct 30, 2021
@gionapaolini gionapaolini changed the title Sqlc not generating string field instead of custom type Sqlc generating string field instead of custom type Oct 30, 2021
@kyleconroy kyleconroy added 📚 postgresql 💻 windows 🔧 golang and removed triage New issues that hasn't been reviewed labels Jan 26, 2022
@kyleconroy
Copy link
Collaborator

Tracking in #2760

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants