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

View with infinite recursion causes 400 bad request #3256

Closed
steve-chavez opened this issue Feb 23, 2024 · 0 comments · Fixed by #3406
Closed

View with infinite recursion causes 400 bad request #3256

steve-chavez opened this issue Feb 23, 2024 · 0 comments · Fixed by #3406
Labels

Comments

@steve-chavez
Copy link
Member

Problem

Having:

create view test.view_projects as
select * from test.projects;

create or replace view test.view_projects as
select * from test.view_projects;

Causes:

curl localhost:3000/view_projects -i
HTTP/1.1 400 Bad Request
Transfer-Encoding: chunked
Date: Fri, 23 Feb 2024 22:01:26 GMT
Server: postgrest/12.1 (160caaf)
Content-Type: application/json; charset=utf-8

{"code":"42P17","details":null,"hint":null,"message":"infinite recursion detected in rules for relation \"view_projects\""}

Solution

Turn 42P17 into a 500 status.

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

Successfully merging a pull request may close this issue.

1 participant