[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble converting database

On Thu, Jun 7, 2012 at 7:33 AM, Robert James Clay <..hidden..> wrote:
> On Tue, 2012-06-05 at 22:31 -0400, Chris Travers wrote:
>> On Tue, Jun 5, 2012 at 10:49 AM, Robert James Clay <..hidden..> wrote:
>> > On Mon, 2012-06-04 at 15:14 -0400, Robert James Clay wrote:
>> > ....  The issue I'm seeing now on the test db is that the
>> > conversion is failing with the following error (1.3.17 install:
>> > from /tmp/ledgersmb/dblog_stderr):
>> >
>> > psql:/tmp/ledgersmb/1.2-1.3-upgrade.sql:356: ERROR:  new row for
>> > relation "entity" violates check constraint "entity_name_check"
>> This probably happens if there is a customer or vendor which doesn't
>> have a valid name (i.e., at least one alphanumeric character in the
>> name).
>    They all (customer & vendor) have that.  The names vary in length
> but none seem to be too long.  Besides strict alphanumeric; they also
> include spaces, dashes, parentheses, commas, and periods.
Are there any where the name is an empty string or just whitespace?

\d entity shows the following check constraint:

 "entity_name_check" CHECK (name ~ '[[:alnum:]_]'::text)

I read that as requiring at least one alphanumeric character or underscore.

This is populated from the name field.

Try this:

select * from customer where name !~  '[[:alnum:]_]'::text;

and the same from vendor.

Best Wishes,
Chris Travers

Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Ledger-smb-users mailing list