Revision 12663
Added by Aaron Marcuse-Kubitza almost 11 years ago
trunk/schemas/util.sql | ||
---|---|---|
1053 | 1053 |
-- create a diff when the # of copies of a row differs between the tables |
1054 | 1054 |
SELECT util.to_freq($1); |
1055 | 1055 |
SELECT util.to_freq($2); |
1056 |
SELECT util.eval($$ALTER TABLE $$||util.typeof($3)||$$ ADD COLUMN copies bigint NOT NULL$$); |
|
1056 |
SELECT util.auto_rm_freq(ARRAY[$1, $2]); |
|
1057 |
SELECT util.try_create($$ALTER TABLE $$||util.typeof($3)||$$ ADD COLUMN copies bigint NOT NULL$$); |
|
1057 | 1058 |
|
1058 | 1059 |
SELECT * FROM util.diff($1, $2, $3, has_freq := true) |
1059 | 1060 |
$_$; |
Also available in: Unified diff
bugfix: schemas/util.sql: diff(regclass, regclass): only drop freq column if all tables have all 1s