Skip to content

Unexpected LEFT JOIN generated for a simple query #3230

Discussion options

You must be logged in to vote

Is there another way to formulate the request to obtain the correct results?

You are looking for top-level filtering via embedding:

https://postgrest.org/en/stable/references/api/resource_embedding.html#top-level-filtering

Two ways to do it: !inner or fathers=not.is.null

Is this a bug?

This is not a bug and works exactly as designed.

What is the purpose of AND "fathers_1"."id" = $2? The actual request only has two parameters, so this is being synthesized by the query builder. It seems quite useless.

This is unexpected. Are you sure the request + query match and you didn't try something else? Can you reproduce that reliably? What does the PostgreSQL log say about which values were pa…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rogerrohrbach
Comment options

Answer selected by rogerrohrbach
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants