Re: COPY FROM is not 8bit clean

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Darcy Buskermolen <darcy(at)ok-connect(dot)com>, Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, pgsql-bugs(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: COPY FROM is not 8bit clean
Date: 2002-02-26 23:33:27
Message-ID: 17211.1014766407@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Can someone explain why this fixes the problem.

Think about a machine where char is signed by default. Extracting \254
into an int will produce -2, which will not equal \254 returned by getc.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2002-02-27 03:09:32 Re: COPY FROM is not 8bit clean
Previous Message Bruce Momjian 2002-02-26 18:05:37 Re: COPY FROM is not 8bit clean

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Conway 2002-02-26 23:42:11 Re: eWeek Poll: Which database is most critical to your
Previous Message Dann Corbit 2002-02-26 23:20:17 Re: eWeek Poll: Which database is most critical to your