Skip to content

Conversation

@greg-rychlewski
Copy link
Member

Closes #757

We didn't discuss this so I'm completely ok discarding it if the decision is to not add it.

The idea came from a google group message here: https://groups.google.com/g/elixir-ecto/c/mooS_UwcuwU. Basically they are trying to use Postgres's explain generic plan statement (e.g. EXPLAIN (GENERIC_PLAN) SELECT * FROM pg_class WHERE relname = $1;) but it does not play nice with the binary protocol because it thinks you need to supply $1 instead of it just being a signal that it's a generic query that you want explained.

Aside from the one specific use case, they also mentioned they are using livebook. And that got me thinking it might be cool to be able to use livebook like an alternative to psql where you can just type in your queries and not worry about binary types and extensions and all that.

I didn't add query_many because it's a bit weird and I would have to think about the implementation. The reason it's weird is because it would only work for the text protocol. So I didn't want to think of a solution if we will not go this direction at all.

Copy link
Member

@josevalim josevalim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am very happy to ship it as is. If you don't want to do query_many, you just need to remove TextQueries :)

@greg-rychlewski greg-rychlewski merged commit de38918 into elixir-ecto:master Feb 1, 2026
13 checks passed
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.

Add support for text queries

2 participants