Skip to content

selectList [FooColumn /<-. [Nothing]] generates SQL that chokes PostgreSQL #619

@chreekat

Description

@chreekat

Tested with Postgres 9.3. The generated sql looks like

("column" IS NOT NULL AND "column" NOT IN ())

That works on sqlite v3, but Postgres 9.3 says

ERROR:  syntax error at or near ")"
LINE 1: select * from foo where column not in ();
                                               ^

...

Note that the following work fine:

Maybe null

selectList [PatronPaymentToken /<-. [Just 1]] []
WHERE (("payment_token" IS NULL OR "payment_token" NOT IN (?)));

Not null and not x

selectList [PatronPaymentToken /<-. [Nothing, Just 1] []
WHERE (("payment_token" IS NOT NULL AND "payment_token" NOT IN (?)));

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