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

WITH RECURSIVE my_func error #33

Closed
BrandiATMuhkuh opened this issue Mar 25, 2021 · 6 comments
Closed

WITH RECURSIVE my_func error #33

BrandiATMuhkuh opened this issue Mar 25, 2021 · 6 comments

Comments

@BrandiATMuhkuh
Copy link

BrandiATMuhkuh commented Mar 25, 2021

When writing a recursive function starting with
WITH RECURSIVE my_func() as ()

I'll get the following error

>  Unexpected word token: "my_func". Instead, I was expecting to see one of the following:
> 
>      - A "kw_as" token

Postgres documentation for this feature: https://www.postgresql.org/docs/9.1/queries-with.html
https://www.postgresqltutorial.com/postgresql-recursive-query/

@BrandiATMuhkuh
Copy link
Author

Is there a way I can contribute? I saw you use a DSL for the parser, but I don't have the expertise on how to use it.

@oguimbal
Copy link
Owner

Hi, it's coming soon !

Incidentally, your request has lead me to a non trivial refactoring... thus the delay :)

@BrandiATMuhkuh
Copy link
Author

I see. Thanks man. I'm not surprised. A DSL that can handle recursion is surely not trivial! Thanks!

@oguimbal
Copy link
Owner

oguimbal commented May 2, 2021

Hi !

Fixed in pgsql-ast-parser@8.1.0 (finally !)

See breaking changes with the 8.0.0 major release.

Sorry for the delay :)

@oguimbal oguimbal closed this as completed May 2, 2021
oguimbal added a commit that referenced this issue May 2, 2021
@BrandiATMuhkuh
Copy link
Author

Awesome. I'll give it a go tomorrow.
No need to say sorry. You are duing this for free for us. I'm super thankful for what you do!

@BrandiATMuhkuh
Copy link
Author

Sorry, It took me longer then expected. I found an issue related to the RECURSIVE function. I made the following issue for it #44

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