Npgsql .net example to insert into hstore from c# Dictionary

99 Views Asked by At

Getting this error on passing Dictionary<string,string> to hstore type column in postgresql

Error: : 'Bytes written (44) and expected byte count (46) don't match.'

If I try to convert it to string in format key => value, getting below error, '42804: column columnname is of type hstore but expression is of type text

Is there any way to handle hstore type from .net c# Npgsql

1

There are 1 best solutions below

0
On

If you're using Npgsql 8.0.0, then you're very probably running into https://github.com/npgsql/npgsql/issues/5445 - that has already been fixed for 8.0.1, which should get released in the next few days.