Skip to content

Build tags to exclude postgresql engine #2050

Closed
@anuraaga

Description

@anuraaga

What do you want to change?

Would it be acceptable to add a build tag such as disable_postgresql to be able to exclude postgresql code from the build completely?

Currently, it is already stubbed out for windows

https://github.com/kyleconroy/sqlc/blob/58b0b6593fc665600619b0dfc69909c68ff2cda2/internal/engine/postgresql/parse_windows.go#L1

So the change would just be adding something like || disable_postgresl

The postgresl uses heavyweight cgo, resulting in issues like #1956, and likely the reason for the lack of windows support in the first place. Having a build tag would allow avoiding the scary looking warnings when using go run. Hopefully it's ok given the one-line nature of the change (could prefix experimental_ or something if not wanting to support indefinitely).

What database engines need to be changed?

PostgreSQL

What programming language backends need to be changed?

Go

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions