initdb failure (was Re: [GENERAL] sequence's plpgsql) - Mailing list pgsql-hackers

Tim McAuley <mcauleyt@tcd.ie> writes:
> Another question now. I am unable to compile Postgresql 7.4 beta 3 under 
> cygwin (Windows 2K, using cgyipc 2).

> I am getting the error:
> "
> creating information schema... ERROR:  end-of-copy marker does not match 
> previous newline style
> CONTEXT:  COPY FROM, line 361
> "

That's interesting.  COPY is complaining because the \. terminator in
the file it's been fed has a different kind of newline after it than
the newlines earlier in the file (LF vs CR/LF, no doubt).  The part
of the initdb script that must be causing this is
 echo "COPY information_schema.sql_features (feature_id, feature_name, sub_feature_id, sub_feature_name, is_supported,
comments)FROM STDIN;" cat "$datadir"/sql_features.txt echo "\."
 
) \| "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely
echo "ok"

so it appears that cygwin's "echo" generates a different newline style
than what got put into sql_features.txt.  A possible way to fix this is
to put the "\." line into sql_features.txt, but maybe there's a cleaner
answer.  Peter, any thoughts?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Shridhar Daithankar
Date:
Subject: Re: Threads vs Processes
Next
From: "Matthew T. O'Connor"
Date:
Subject: Re: initdb failure (was Re: [GENERAL] sequence's plpgsql)