How to make schema dumps comparable between Windows and Linux

Posted by Jonathan on Server Fault See other posts from Server Fault or by Jonathan
Published on 2010-05-26T12:06:17Z Indexed on 2010/05/26 12:11 UTC
Read the original article Hit count: 272

Filed under:
|
|

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?

© Server Fault or respective owner

Related posts about linux

Related posts about Windows