Skip to content

Add support for COALESCE with up to 10 args on subset queries#4030

Closed
evanob wants to merge 1 commit intoelectric-sql:mainfrom
liveflow-io:coalesce
Closed

Add support for COALESCE with up to 10 args on subset queries#4030
evanob wants to merge 1 commit intoelectric-sql:mainfrom
liveflow-io:coalesce

Conversation

@evanob
Copy link
Copy Markdown
Contributor

@evanob evanob commented Mar 19, 2026

We would like to be able to use COALESCE in tanstack/db and have that work with subset queries on Electric backend. The decision to support 10 arguments is fairly arbitrary, but we can't support any number of arguments.

@evanob evanob marked this pull request as ready for review March 19, 2026 13:19
@icehaunter
Copy link
Copy Markdown
Contributor

Hey! Thanks a lot for the contribution. I've taken this as a required push to expose already-supported variadic functions into defpostgres to support arbitrary-count coalescing (also greatest/least and other array functions in the future). See #4114 - if it matches your requirements, it should supersede this PR.

@evanob
Copy link
Copy Markdown
Contributor Author

evanob commented Apr 11, 2026

that's much better, thank you @icehaunter!

@evanob evanob closed this Apr 11, 2026
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

Successfully merging this pull request may close these issues.

2 participants