Re: pg_upgrade diffs on WIndows
От | Bruce Momjian |
---|---|
Тема | Re: pg_upgrade diffs on WIndows |
Дата | |
Msg-id | 20120905195156.GD8774@momjian.us обсуждение исходный текст |
Ответ на | Re: pg_upgrade diffs on WIndows (Andrew Dunstan <andrew@dunslane.net>) |
Список | pgsql-hackers |
On Wed, Sep 5, 2012 at 03:50:13PM -0400, Andrew Dunstan wrote: > >>The second lot of CRs (seen in the second dump file in the diff i > >>previously sent) is produced by pg_upgrade writing its output in > >>text mode, which turns LF into CRLF. The solution to that is the > >>patch to dump.c I posted, which, as Bruce observed, does the same > >>thing that pg_dumpall does. Arguably, it should also open the input > >>file in binary, so that if there really is a CRLF in the dump it > >>won't be eaten. > >So, right now we are only add \r for function bodies, which is mostly > >harmless, but what if a function body has strings with an embedded > >newlines? What about creating a table with newlines in its identifiers: > > > >CREATE TABLE "a > >b" ("c > >d" int); > > > >If \r is added in there, it would be a data corruption problem. Can you > >test that? > > These are among the reasons why I am suggesting opening the file in > binary mode. You're right, that would be data corruption. > > I can set up a check, but it will take a bit of time. My only point is that this is no longer a buildfarm failure issue, it is a potential data corruption issue. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +
В списке pgsql-hackers по дате отправления: