-
Notifications
You must be signed in to change notification settings - Fork 813
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
Wrong null Time type when emit_pointers_for_null_types is set to true for pgx/v5 #2630
Comments
Oh, I'm sorry, I've tried to find existing issue for that but I couldn't. Is it also going to address problem with incorrect |
I don't think I also don't think the value of I think you can get the behavior you want with an override though. See the playground link below. Note that for the example to work I had to define column types as https://play.sqlc.dev/p/46304e09afdea98104a6b7c2e4ec0aae63cfb17104714e3fceda8a4fa1e0c457 |
Well, documentation on
So according to the above not outputting Thanks for the tip for |
I think this is correct, having looked a little deeper. I'll update the title of this issue and reopen. There is an early return in sqlc/internal/codegen/golang/postgresql_type.go Lines 247 to 258 in ac32049
Yes I think so, thanks. |
Just for reference, here is all types that has
|
Created as a separate issue here: #2914 |
Version
1.21.0
What happened?
When
query_parameter_limit > 0
andemit_pointers_for_null_types
is set totrue
sqlc generates parameter type of DB engine specific time type instead of*time.Time
:pgx/v5:
func (q *Queries) UpdateLoginTime(ctx context.Context, uid uuid.UUID, lastLogin pgtype.Timestamptz) (User, error) {
I expect type for
lastLogin
to be*time.Time
.Database schema
SQL queries
Configuration
Playground URL
No response
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go
The text was updated successfully, but these errors were encountered: