EnterpriseDB / mongo_fdw

PostgreSQL foreign data wrapper for MongoDB
GNU Lesser General Public License v3.0
326 stars 70 forks source link

embedded documents update for array elements lead to postgres restart #155

Open zhang699 opened 2 years ago

zhang699 commented 2 years ago

I have use pgAdmin GUI to test embedded update by mongo_fdw

Tested Documents

collection: warehouse
{
  _id: ObjectId("61d7ad616372f5550c92ac4b"),
  elements: ["a", "b"]
}

SQL Schema

id: name
elements: text[]
vaibhavdalvi93 commented 2 years ago

Thanks, @zhang699 for reporting an issue.

I can reproduce the same issue at my end. This is a bug.

The root cause of the issue is that while preparing the query document, provided the wrong first argument to the function BsonAppendUTF8() which is called by function AppendMongoValue().

We will work on this issue in near future.

zhang699 commented 2 years ago

Thanks, @zhang699 for reporting an issue.

I can reproduce the same issue at my end. This is a bug.

The root cause of the issue is that while preparing the query document, provided the wrong first argument to the function BsonAppendUTF8() which is called by function AppendMongoValue().

We will work on this issue in near future.

Great !!

vaibhavdalvi93 commented 2 years ago

Hi @zhang699 ,

The reported issue has been resolved. It would be good if you please confirm from your side on latest head/release and close the ticket if it's been resolved.