SQL Connector issue: prepared statement - Supabase integration

Hello,

Today Supabase has changed the SQL database connection type.(PGBouncer and IPv4 Deprecation · supabase · Discussion #17817 · GitHub)

I used the new string for the connection and now I have constant error messages about prepared statements. Example - SQL Database Connector issue: prepared statement “c99732d6f5e095d0c24f9c85cabe9fe0” already exists.

As I understand it, there are 2 types of connections on the Supabase side - Transaction and Session. Session mode supports prepared statements. As I understood it (from ChatGPT), it means that you should specify your request differently if you make many requests with one variable. ChatGPT advises me to add PREPARE, EXECUTE and DEALLOCATE parts to the SQL query, but Bubble only supports the body of the one query.

I have a list of profiles and make a separate query for opening a profile. Every other query now returns an error.

Is there any way to fix this?

Thank you

2 Likes

I’ve started to see the same issue with queries to by Supabase DB. Were you able to find a fix @lowcoding ?

Same error here with supabase postgresql database… Has someone found a fix?

I found a fix! Just change the end of your connection string from :6543/postgres to :5432/postgres

1 Like

Paul - thank you for posting this. Solved it for me as well. Is this port supposed to be changed in the DB setup as well? Or have you found any documentation on it?

Cheers from Canada