Re: Error in running DBT2

From: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Error in running DBT2
Date: 2014-05-13 21:51:25
Message-ID: 1400017884910-5803817.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Rohit Goyal wrote
> Hi Peter,
>
> On Tue, May 13, 2014 at 9:44 PM, Peter Geoghegan &lt;

> pg@

> &gt; wrote:
>
>>
>> On Tue, May 13, 2014 at 12:36 PM, Rohit Goyal &lt;

> rhtgyl.87@

> &gt; wrote:
>>
>>> This pattern the above found many times. Please guide me through!!!
>>>
>>
>> IIRC, people have been working around this by setting
>> standard_conforming_strings to "off". It really ought to be fixed in a
>> principled way, though -- the real issue here is that dbt2 has severe
>> bit-rot.
>>
>> Can you please elaborate, where I can make this changes :) ?

Peter?

The error is more typical of someone creating a database with UTF-8 encoding
but then tries storing Latin-1 (or some other) encoded data. Since not all
byte sequences in the source data encoding are valid in UTF-8 when one of
the invalid sequences is present the import fails. PostgreSQL makes no
attempt to perform data conversion on import.

The solution is to create the database with the correct encoding - whatever
it may be. This "DBT2" application should provide guidance on this topic.
Otherwise you could use "SQL_ASCII" - which is effectively punting on the
issue:

http://www.postgresql.org/docs/9.3/static/sql-createdatabase.html
http://www.postgresql.org/docs/9.3/static/multibyte.html#MULTIBYTE-CHARSET-SUPPORTED

IIRC given that the error happens in a SQL COPY
"standard_conforming_strings" has no bearing on the outcome.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Error-in-running-DBT2-tp5803793p5803817.html
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2014-05-13 22:20:12 Re: Error in running DBT2
Previous Message Tom Lane 2014-05-13 21:07:29 Re: buildfarm / handling (undefined) locales