{"record":{"id":"2d68fb4d3de7b4d5","repo":"ankane/pgsync","slug":"table-not-found-in-source-table-name","errorCode":null,"errorMessage":"Table not found in source: #{table.name}","messagePattern":"Table not found in source: #(.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"lib/pgsync/task_resolver.rb","lineNumber":187,"sourceCode":"        end\n      end\n      [groups, tables]\n    end\n\n    def no_schema_tables\n      @no_schema_tables ||= begin\n        search_path_index = source.search_path.map.with_index.to_h\n        source.tables.group_by(&:name).map do |group, t2|\n          [group, t2.select { |t| search_path_index[t.schema] }.sort_by { |t| search_path_index[t.schema] }.first]\n        end.to_h\n      end\n    end\n\n    # for tables without a schema, find the table in the search path\n    def fully_resolve(table, error: true)\n      return table if table.schema\n      resolved_table = no_schema_tables[table.name]\n      raise Error, \"Table not found in source: #{table.name}\" if !resolved_table && error\n      resolved_table\n    end\n\n    # parse command line arguments and YAML\n    def to_arr(value)\n      if value.is_a?(Array)\n        value\n      else\n        # Split by commas, but don't use commas inside double quotes\n        # https://stackoverflow.com/questions/21105360/regex-find-comma-not-inside-quotes\n        value.to_s.split(/(?!\\B\"[^\"]*),(?![^\"]*\"\\B)/)\n      end\n    end\n\n    def sql_arg\n      args[1]\n    end\n","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/ankane/pgsync/blob/57bdddf5db506d329b51cb3376379dc3a2559010/lib/pgsync/task_resolver.rb#L169-L205","documentation":"Error \"Table not found in source: #{table.name}\" thrown in ankane/pgsync.","triggerScenarios":"Thrown at lib/pgsync/task_resolver.rb:187 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"}