Skip to content

[Plugins] Write a Rails gem to make their prepared statements work #1520

Description

@levkk

This is not strictly PgDog-related.

Rails (Ruby on Rails) does a lot of nasty stuff with prepared statements that make them basically unusable:

  1. It uses IN ($1, $2, $3) instead of = ANY($1)
  2. It injects comments directly into the query sql

Both blows up the statement cache cardinality, on our end and theirs.

We should write a gem that monkeypatches this so people have an easier time migrating to prepared statements when using Rails. We should support several recent versions.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions