{"record":{"id":"8403d2af7a817c3c","repo":"ankane/pgsync","slug":"cannot-use-parameters-with-tables","errorCode":null,"errorMessage":"Cannot use parameters with tables","messagePattern":"Cannot use parameters with tables","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"lib/pgsync/task_resolver.rb","lineNumber":71,"sourceCode":"    def group_to_tasks(value)\n      group, param = value.split(\":\", 2)\n      raise Error, \"Group not found: #{group}\" unless group?(group)\n\n      @groups[group].map do |table|\n        table_sql = nil\n        if table.is_a?(Array)\n          table, table_sql = table\n        end\n\n        {\n          table: to_table(table),\n          sql: expand_sql(table_sql, param)\n        }\n      end\n    end\n\n    def table_to_tasks(value)\n      raise Error, \"Cannot use parameters with tables\" if value.include?(\":\")\n\n      tables =\n        if value.include?(\"*\")\n          regex = Regexp.new('\\A' + Regexp.escape(value).gsub('\\*', '[^\\.]*') + '\\z')\n          shared_tables.select { |t| regex.match(t.full_name) || regex.match(t.name) }\n        else\n          [to_table(value)]\n        end\n\n      tables.map do |table|\n        {\n          table: table,\n          sql: sql_arg # doesn't support params\n        }\n      end\n    end\n\n    # treats identifiers as if they were quoted (Users == \"Users\")","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/ankane/pgsync/blob/57bdddf5db506d329b51cb3376379dc3a2559010/lib/pgsync/task_resolver.rb#L53-L89","documentation":"Error \"Cannot use parameters with tables\" thrown in ankane/pgsync.","triggerScenarios":"Thrown at lib/pgsync/task_resolver.rb:71 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"57bdddf5db506d329b51cb3376379dc3a2559010","analyzedAt":"2026-08-23T11:18:48.887Z","schemaVersion":2},"datasetVersion":"2026-08-23T16:17:53.355Z"}