Re: newline conversion in SQL command strings
От | Andrew Dunstan |
---|---|
Тема | Re: newline conversion in SQL command strings |
Дата | |
Msg-id | 505B74CF.2050208@dunslane.net обсуждение исходный текст |
Ответ на | Re: newline conversion in SQL command strings (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
On 09/20/2012 03:34 PM, Tom Lane wrote: > Andrew Dunstan <andrew@dunslane.net> writes: >> On 09/20/2012 09:12 AM, Peter Eisentraut wrote: >>> It has been proposed that the plsh handler should strip the CRs before >>> execution. But I don't think that is a correct solution, because that >>> is user data which could be relevant. It could be the case, for >>> example, that plsh is run on a Windows host with a particular shell that >>> requires CRLF line endings. >> I confess I find it hard to take plsh terribly seriously, > Perhaps, but the general problem remains, for any language whose > interpreter is unforgiving about line endings. plsh is the only one I know of that writes the script out to a temp file, and it opens that file on Windows in text mode (if I'm looking at the right source), which will convert LF into CRLF. Hence my suggestion that he change that. Of course, if the function body actually has embedded CRs then there is a different set of problems. cheers andrew
В списке pgsql-hackers по дате отправления: