How to make schema dumps comparable between Windows and Linux
- by Jonathan
I have two systems running, one on linux and the other on windows. From the linux box, I ran pg_dump against both systems and dumped the schema.
pg_dump command:
pg_dump -h HOST -U USER -s -f /tmp/out.sql DB_NAME
After I removed all of the "--" comments, I diffed the files together.
Diff output snippet, linux compared to windows:
- ADD CONSTRAINT sys_c004775 FOREIGN KEY (ruleid) REFERENCES rule(ruleid);
+ ADD CONSTRAINT sys_c004775 FOREIGN KEY (ruleid) REFERENCES "rule"(ruleid);
The linux dump does not quote any entities and windows does. Is this a function of some encoding or just of a difference between windows and linux? Is there an option in pg_dump to make the output more consistent?