Re: pg_restore direct to database is broken for --insert dumps

Andrew Dunstan <andrew@dunslane.net>

From: Andrew Dunstan <andrew@dunslane.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgreSQL.org
Date: 2012-01-05T14:51:07Z
Lists: pgsql-hackers

On 01/04/2012 06:20 PM, Tom Lane wrote:
>> Could we detect an appropriate line ending in ahwrite() after it's been
>> decompressed and buffer partial lines accordingly?
> Not easily: there could be newlines embedded in data strings or SQL
> identifiers.
> 	


Should we look at eliminating those newlines for the future by using 
U&"" identifiers where there are embedded newlines and unicode escapes 
for newlines in data strings?

Then at least we'd possibly be able to get rid of the kludge some time 
in the future.


cheers

andrew