Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicit type signatures fail to parse #28

Open
nikita-volkov opened this issue Nov 11, 2019 · 2 comments
Open

Explicit type signatures fail to parse #28

nikita-volkov opened this issue Nov 11, 2019 · 2 comments

Comments

@nikita-volkov
Copy link

E.g.,

> parseQueryExpr defaultParseFlags "" Nothing "select 'a' :: text"
Left (line 1, column 12):
unexpected (("",1,12),Symbol ":")
expecting operator or end of input
cannot make functioncall from StringLit (Annotation {anSrc = Just ("",1,8), anType = Nothing, anErrs = [], anImplicitCast = Nothing, anCatUpd = []}) "a"
:1:12:

Context:
select 'a' :: text
           ^
      ERROR HERE
@JakeWheat
Copy link
Owner

Does it work if you use the postgresDialect in the parse flags? The default dialect is ANSI which doesn't support this syntax for casts. The dialect support is a bit flakey at the moment.

@nikita-volkov
Copy link
Author

Already moved on to another solution. Sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants