Skip to content

Is it a specification for sqlc that retrieving null from a nullable boolean column in Postgres results in false? #20

Open
@Toru-Takagi

Description

@Toru-Takagi

When creating a boolean (nullable) column in Postgres.

When generating code from SQL that retrieves this column, it becomes results.getBoolean() .
Reading ResultSet.java, it states

"Returns: the column value; if the value is SQL NULL, the value returned is false."

Ideally, if the table contains null, I would like it to return null.

I would like to hear the maintainer's opinion on this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions