wangyong86 commented on issue #2312:
URL: https://github.com/apache/age/issues/2312#issuecomment-3783084109

   For the below case and data
   ```sql
   1205=# select load_labels_from_file('owg', 'Personx', 
'overwrite_load/file1.csv');
   ERROR:  Cannot insert duplicate vertex id: 957014890901079
   HINT:  Entry id 112589960769111 is already used
   1205=# \d+ "owg"."Personx";
                                                                                
               Table "owg.Personx"
      Column   |  Type   | Collation | Nullable |                               
                 Default                                                | 
Storage  | Compression | Stats target | Description
   
------------+---------+-----------+----------+-------------------------------------------------------------------------------------------------------+----------+-------------+--------------+-------------
    id         | graphid |           | not null | 
_graphid(_label_id('owg'::name, 'Personx'::name)::integer, 
nextval('owg."Personx_id_seq"'::regclass)) | plain    |             |           
   |
    properties | agtype  |           | not null | agtype_build_map()            
                                                                        | 
extended |             |              |
   Indexes:
       "Personx_pkey" PRIMARY KEY, btree (id)
   Inherits: owg._ag_label_vertex
   
   112589960769111,tom,25
   112589960769112,jonh,30
   112589960769113,michale,28
   ```
   load_labels_from_file check conflict using index of "Person_pkey",  but the 
real conflicted column is the sub-field of properties.
   
   So, it's a coincidence or a special design? It's reasonable to force a 
unique index on properties.id?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to