| 40 | } |
| 41 | |
| 42 | target_table::target_table(prod *p, table *victim) : table_ref(p) |
| 43 | { |
| 44 | while (! victim |
| 45 | || victim->schema == "pg_catalog" |
| 46 | || !victim->is_base_table |
| 47 | || !victim->columns().size()) { |
| 48 | struct named_relation *pick = random_pick(scope->tables); |
| 49 | victim = dynamic_cast<table *>(pick); |
| 50 | retry(); |
| 51 | } |
| 52 | victim_ = victim; |
| 53 | refs.push_back(make_shared<aliased_relation>(scope->stmt_uid("target"), victim)); |
| 54 | } |
| 55 | |
| 56 | void target_table::out(std::ostream &out) { |
| 57 | out << victim_->ident() << " as " << refs[0]->ident(); |
nothing calls this directly
no test coverage detected