Skip to content

Ability to use nullable return type #2284

Open
@shagohead

Description

@shagohead

What do you want to change?

I cannot figure out how to use expressions like these:

SELECT
    (CASE WHEN question_id IS NOT NULL THEN (answer_id IS NOT NULL) ELSE NULL END) answered
...

In these example I want to get boolean only if condition is true, and null if not.

If I do not cast explicit type, I will have an error parse table name: unexpected node type: *ast.Null.
If I cast, I can use only non nullable type.

Maybe you know the way to get this nullable row column?

Thank you!

What database engines need to be changed?

PostgreSQL

What programming language backends need to be changed?

Go

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions