manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Connectors Framework > How to Write an Output Connector
Date Thu, 21 Oct 2010 12:42:00 GMT
Space: Apache Connectors Framework (https://cwiki.apache.org/confluence/display/CONNECTORS)
Page: How to Write an Output Connector (https://cwiki.apache.org/confluence/display/CONNECTORS/How+to+Write+an+Output+Connector)
Comment: https://cwiki.apache.org/confluence/display/CONNECTORS/How+to+Write+an+Output+Connector?focusedCommentId=24183821#comment-24183821

Comment added by Farzad:
---------------------------------------------------------------------

You were right : ) Here is what you get, when I added:

ArrayList list = new ArrayList();
list.add(hashsum);
list.add(dupnum);
addTableIndex(true, list);

Error: ERROR: duplicate key value violates unique constraint "i1287662986761" Detail: Key
(hashsum, dupnum)=(C46875547F6B97BAC41132F6F8A057CC10060FBC69B5B26428D6D561E00AE1F1B1C8BBD5664FC4C94E95A5AC31045C3EAA8AE11DB19A697CC410F3EC9E233D38,
1) already exists.

So I don't see how to isolate the primary key violation.  All I see in ManifoldCFException
is DATABASE_TRANSACTION_ABORT, which is what I get when I call getErrorCode(). How do I know
I have a primary key violation vs other transaction errors?

In reply to a comment by Karl Wright:
Like I said before, creating a unique index creates exactly the same Postgresql constraints
as having multiple primary keys.  The same (or a very similar) SQL error is returned when
the constraint is violated.


Change your notification preferences: https://cwiki.apache.org/confluence/users/viewnotifications.action

Mime
View raw message