PostgreSQL block query doesn't work anymore #6374
-
We updated to Budibase v1.0.110 and during regression test, the following query no longer works.
The error we get back from the postgres server is:
We're using postgres v13.4 Tried removing the single quotes and got the same results. thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
HI @kmdelucaNG Just to confirm, are you upgrading from v1.0.110 to the latest version v1.0.206 ? |
Beta Was this translation helpful? Give feedback.
-
Hi @kmdelucaNG Thanks for the confirmation. Is there any reason you're not upgrading straight to 1.0.206 (it would include a number of additional SQL related bug fixes) With the major upgrade from v0 to v1, there were security improvements made to the SQL queries, which as a result may also limit the types of queries you can make. It may be worth running the various parts of your query in Budibase to determine by trial and error which part is not permissible. |
Beta Was this translation helpful? Give feedback.
-
Upgraded to v1.0.206 but still have the same problem. Appears to have something to do with the combination of statement blocks and bindings. |
Beta Was this translation helpful? Give feedback.
-
Not sure if there was a better way to fix this, but I ended up converting the Budibase query to a postgres stored procedure and was able to successfully call it from Budibase. |
Beta Was this translation helpful? Give feedback.
Not sure if there was a better way to fix this, but I ended up converting the Budibase query to a postgres stored procedure and was able to successfully call it from Budibase.
CALL "CreateTMSSourceData"( {{tmsTrackType}}::text, {{tmsMethodName}}::text, {{tmsNotes}}::text, {{mappingDecision}}::text );