Revision 6466
Added by Aaron Marcuse-Kubitza over 12 years ago
make_analytical_db | ||
---|---|---|
16 | 16 |
local public_table="\"$public\".$table" analyt_table="analytical_db.$table" |
17 | 17 |
cat <<EOF |
18 | 18 |
-- Create $table |
19 |
TRUNCATE $table; |
|
20 |
INSERT INTO $table SELECT * FROM ${table}_view;
|
|
19 |
TRUNCATE $public_table;
|
|
20 |
INSERT INTO $public_table SELECT * FROM ${public_table}_view;
|
|
21 | 21 |
|
22 | 22 |
-- Create $analyt_table view pointing to table in $public |
23 | 23 |
DROP VIEW IF EXISTS $analyt_table; |
Also available in: Unified diff
make_analytical_db: mk_analytical_table(): Use explicit schema references everywhere. This fixes a bug where the TRUNCATE/INSERT steps on the public schema's table would reference the analytical_db view instead because they were not schema-scoped.