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

Add Postgres all as builtin function #1303

Open
spiffytech opened this issue Dec 28, 2024 · 3 comments
Open

Add Postgres all as builtin function #1303

spiffytech opened this issue Dec 28, 2024 · 3 comments
Labels
api Related to library's API enhancement New feature or request postgres Related to PostgreSQL

Comments

@spiffytech
Copy link

spiffytech commented Dec 28, 2024

The all API is just like any's. Whereas any is used for 'is this value present', 'all' is often used for 'is this value not present'. Since they go hand-in-hand, it feels appropriate that since we have db.fn.any(), we also have db.fn.all().

@spiffytech spiffytech changed the title Support postgres all function Add Postgres all as builtin function Dec 28, 2024
@koskimas
Copy link
Member

koskimas commented Jan 5, 2025

When is all useful? It just checks that the array (or other expression) is full of one single value?

@koskimas
Copy link
Member

koskimas commented Jan 5, 2025

Oh, right. You can do "not in" using foo != ALL(array).

@igalklebanov igalklebanov added enhancement New feature or request postgres Related to PostgreSQL api Related to library's API labels Jan 5, 2025
@spiffytech
Copy link
Author

Yep: any and all are often used for semantically similar work to in and not in, but for working with arrays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Related to library's API enhancement New feature or request postgres Related to PostgreSQL
Projects
None yet
Development

No branches or pull requests

3 participants