pgloader icon indicating copy to clipboard operation
pgloader copied to clipboard

pgloader mssql to postgres creates other tables with view filter

Open bheemvennapureddy opened this issue 1 year ago • 2 comments

  • [ ] pgloader --version

    3.6.9
    
  • [X] did you test a fresh compile from the source tree?

  • [X] did you search for other similar issues?

  • [X] how can I reproduce the bug?

    Create a load files with a filter and copies more than whats expected.
    
    	pgloader --debug my.load
    
    
LOAD DATABASE
     FROM mssql://blah/dev
     INTO postgresql://blah/archive

MATERIALIZE VIEWS
       history AS $$ select * from Receipt where RECEIPT_KEY in ( 1010 ); $$
set work_mem to '32MB', maintenance_work_mem to '512 MB'
alter schema 'dbo' rename to 'arch'
ALTER TABLE NAMES MATCHING 'Receipt' IN SCHEMA 'dbo' RENAME TO 'receipt';

  • [X] pgloader output you obtain

log.txt

bheemvennapureddy avatar Aug 10 '24 03:08 bheemvennapureddy

I am experiencing the exact same problem. It's a deal breaker for most of my migration tasks because some of the databases I'm migrating in MSSQL have column names longer than the max allowed column names in postgres among other edge cases that could be resolved if the MATERIALIZE VIEWS worked properly for MSSQL sources.

Steve525 avatar Feb 27 '25 17:02 Steve525

For reference: #1551

Steve525 avatar Feb 27 '25 18:02 Steve525