pgloader/test/pgsql-source.load
Dimitri Fontaine b8e8cf7d18 Fix bugs in the recent extended support for materialized views.
Materialized views without an explicit schema name are supported, but then
would raise an error when trying to use destructuring-bind on a string
rather than the (cons schema-name table-name). This patch fixes that.
2018-12-28 10:53:01 +01:00

15 lines
457 B
Fish

load database
from pgsql://localhost/pgloader
into pgsql://localhost/copy
-- including only table names matching 'bits', ~/utilisateur/ in schema 'mysql'
including only table names matching ~/geolocations/ in schema 'public'
materialize views some_usps
as $$
select usps, geoid, aland, awater, aland_sqmi, awater_sqmi, location
from districts
where usps in ('MT', 'DE', 'AK', 'WY', 'PR', 'VT', 'SD', 'DC', 'ND');
$$
;