Re: [PATCHES] initdb conf-files linebreaks
"Magnus Hagander" <[EMAIL PROTECTED]> writes: > That does seem to work, yes. I thought there was some magic reason we > were using PG_BINARY_W and not "w".. Assuming there isn't, attached > patch is certainly cleaner. Looks reasonable to me. Patch applied. regards, tom lane ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [PATCHES] initdb conf-files linebreaks
Magnus Hagander wrote: Attached patch makes initdb generate the config files with windows linebreaks when running on windows. This makes it a lot easier for the user to edit the configuration files, since any win32 plaintext editor can be used (such as notepad for example). If this is acceptable, and the method is ok, please apply for beta4 so we can add some nice icons to the win32 installer :-) Assuming this works, the far simpler change would (or should) be to open the file with "w" rather than PG_BINARY_W in all cases. That does seem to work, yes. I thought there was some magic reason we were using PG_BINARY_W and not "w".. Assuming there isn't, attached patch is certainly cleaner. I don't recall. It's been there since before the code was even committed to CVS, by the look of it. Probably I was just trying to be as Unix-like as possible. It might break if we feed it a Ctrl-Z, but that isn't likely in this case, is it? cheers andrew ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [PATCHES] initdb conf-files linebreaks
>>Attached patch makes initdb generate the config files with windows >>linebreaks when running on windows. This makes it a lot easier for the >>user to edit the configuration files, since any win32 plaintext editor >>can be used (such as notepad for example). >> >>If this is acceptable, and the method is ok, please apply for beta4 so >>we can add some nice icons to the win32 installer :-) >> >> >> > >Assuming this works, the far simpler change would (or should) >be to open >the file with "w" rather than PG_BINARY_W in all cases. That does seem to work, yes. I thought there was some magic reason we were using PG_BINARY_W and not "w".. Assuming there isn't, attached patch is certainly cleaner. >I don't know what Windows editors other than Notepad don't understand >line feeds properly - Wordpad at least does, as well as every editor I >actually use on Windows. I've seen a couple, though I can't recall right now which they were. Wordpad can play some nasty tricks on you with copy/paste, and semi-formatted texts, though. I don't use notepad much myself either, since there are plenty of good editors out there. But notepad is the one that's going to be on *every* windows system... //Magnus initdb_win32newline2.patch Description: initdb_win32newline2.patch ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [PATCHES] initdb conf-files linebreaks
Magnus Hagander wrote: Attached patch makes initdb generate the config files with windows linebreaks when running on windows. This makes it a lot easier for the user to edit the configuration files, since any win32 plaintext editor can be used (such as notepad for example). If this is acceptable, and the method is ok, please apply for beta4 so we can add some nice icons to the win32 installer :-) Assuming this works, the far simpler change would (or should) be to open the file with "w" rather than PG_BINARY_W in all cases. I don't know what Windows editors other than Notepad don't understand line feeds properly - Wordpad at least does, as well as every editor I actually use on Windows. cheers andrew ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings