Fork me on GitHub
#sql
<
2022-08-15
>
vemv19:08:29

This is bit of a hopeless question but I have this query in production:

{:select [[[:exists {:select :*
                     :from   :pg_catalog.pg-tables
                     :where  [:and
                              [:= :schemaname "public"]
                              [:= :tablename table-name-string]]}]]]}
which returns {:exists? false} in the defn where it naturally is invoked. But if I repl-connect to that same prod server, and perform the same query, it returns {:exists? true} . What could be going on? I don't have any caching here. (I do have HikariCP...)

athomasoriginal19:08:09

permissions issue? Is that table accessible to the user running the above query in prod?

vemv07:08:06

thanks for the suggestion :) the issue was that table-name-string was simply (name x) but it lacked dash->underscore substitution, like honeysql normally performs with table names