Unable to disable prepared statements for Retool DB enviroments other than production

There is only one settings page for Retool DB where you can enable the Disable converting queries to prepared statements option. While using other environments than the default production I get errors with queries that need that setting turned on. It is clear that SQL injection protection is turned on here as staging environment uses prepared queries.

Is there any other way to turn off queries converting to prepared statements?


Hey @dobatovkin! Thanks for the report, I was able to reproduce the issue and have submitted a bug report / feature request to be able to turn off prepared statements for RetoolDB environments other than production. I'll update this post when I have any additional information.

1 Like

Any updates here @joeBumbaca ?

I'm still having that issue and blocked from doing more development.

@First4Figures No updates yet. I've bump the ticket internally and we will update this topic as soon as we have any additional information to share.

1 Like

Hey @First4Figures :wave:. In the meantime you can use the following workaround: you can add your retool db as Postgres database connection in Retool Resources and disable prepared statements from its settings.

1 Like

Thank you @dobatovkin - Unfortunately it's not working setting up the connection. Connection string required sslmode=require and even if I specify in the connection options it won't connect.

Any ideas?

@First4Figures If you remove sslmode=require from the connection string and instead click the Use SSL/TLS checkbox (at the bottom of the screenshot you provided), it should work.