42601: syntax error

This is not a trick or technique, but just a basic FYI tip in case someone receives the same error I did and searches for it. Maybe this information saves you a little bit of time in deciding how to proceed.

I revised the security filter of a table in an attempt to optimize it according to the Efficient security filter definitions for database data help article. When I did so, I subsequently received the following error when syncing the app.

  • Error: Data table 'Contacts' is not accessible due to: 42601: syntax error at or near ")".

When I search for that error message online, it seems to be related to how AppSheet formulates the query for the cited table's Postgres database data source.

Since the security filter expression fully validates within AppSheet but nonetheless produces this error, I reported it to AppSheet Support. Here's the response I received.

Meaning An expression you have used has a structure that might make it inefficient to evaluate when the app is running.
Likely Cause The most common cause for this warning is the use of SELECT() functions in your expression. In many cases, each SELECT() function evaluation requires accessing an entire table of data.
Resolution Steps Consider simplifying your expression and avoiding the use of SELECT() unless your data set is small.
2 0 1,018
0 REPLIES 0
Top Labels in this Space