Skip to content

Generate code with pgxV5 inet field type #2766

Description

@mayken

Version

1.21.0

What happened?

A bug happened!

Relevant log output

../../pkg/db/sqlc/querier.go:9:2: "net/netip" imported and not used

Database schema

CREATE TABLE IF NOT EXISTS refresh_tokens (
    user_id bigint REFERENCES users(id) ON DELETE CASCADE,
    ip inet NOT NULL,
);

SQL queries

No response

Configuration

version: "2"
sql:
- engine: "postgresql"
  queries: "./pkg/db/query"
  schema: "./pkg/db/migration"
  database:
    uri: "postgres://...."
  gen:
    go:
      package: "db"
      sql_package: "pgx/v5"
      out: "./pkg/db/sqlc"
      emit_json_tags: true
      emit_interface: true
      emit_empty_slices: true
      overrides:
        - db_type: "timestamptz"
          go_type: "time.Time"
        - db_type: "uuid"
          go_type: "github.com/google/uuid.UUID"

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

Activity

  1. added
    bugSomething isn't working
    triageNew issues that hasn't been reviewed
    on Sep 23, 2023
  2. kyleconroy commented on Sep 23, 2023

    @kyleconroy
    Collaborator

    First reported in #2707 and fixed in #2709, which will be released on Tuesday of next week.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageNew issues that hasn't been reviewed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions