pg-materialize icon indicating copy to clipboard operation
pg-materialize copied to clipboard

Missing newlines if source files do not start with `BEGIN;\n SELECT ...`

Open oguzhanogreden opened this issue 6 years ago • 2 comments

The create- file generated by the module will have lines as follows, if the source file does not have an empty line as its first line:

-- test_input/test.pgsqlCREATE MATERIALIZED VIEW test.test_table_mv

whereas it should be regardless of how the file starts:

-- test_input/test.pgsql
CREATE MATERIALIZED VIEW test.test_table_mv

Thanks for the module, I'll get to this soon and send a PR.

oguzhanogreden avatar Oct 09 '19 08:10 oguzhanogreden

This happens since you're expecting a specific format here.

oguzhanogreden avatar Oct 09 '19 09:10 oguzhanogreden

Hi @oguzhanogreden - please feel free to submit a PR and I can take a look at that!

aanari avatar Nov 01 '19 06:11 aanari