cartodb,public in search_path has to be set in an upper layer. Also removing the workaround with dbname and search_path.