BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Npgsql Gets Visual Studio Data Designer Integration, JSONB Support

Npgsql Gets Visual Studio Data Designer Integration, JSONB Support

This item in japanese

Npgsql 2.2.0 comes as a feature packed release. It adds VS Data Designer support, several Entity Framework-specific improvements and support for the Postgres 9.4 feature, the JSONB datatype.

Prior to 2.2.0, it was impossible to add Npgsql provider to be accessible in Visual Studio (for e.g. via machine config file) because it did not support DDEX. It now adds this support through a new extension. The feature entails more than 500 file changes and 48 commits. Francisco Jr, creator of Npgsql, mentions that this was a heavily requested feature.

Refer to the step-by-step process to enable this integration. The Npgsql community is working on creating an exe installer for Npgsql, and the process should get simpler once it is available.

The release also adds JSON support via JSONB, JSON and HStore datatypes. As we reported earlier, JSONB is a new datatype introduced in Postgresql 9.4 that combines features of both JSON and HStore implementations and provides Postgres with better NoSQL features. Now .NET developers can leverage those features through Npgsql. Note that both JSON and HStore users are expected to move to JSONB, eventually.

Npgsql also now supports GSSAPI on Windows, making it easier to use Active Directory when authenticating users.

Some other useful features and fixes are related to EF6 -

SSLStream support was first added to Npgsql last year; this does not depend on Mono.Security assembly for security. The new version has SSLStream on by default. This is in preparation for removal of dependency on Mono.Security in a future release.

Npgsql 2.2.0 also removes support for Postgres version 8.4 and below. If you want to use an older Postgres version, you need to use an older version of Npgsql. Francisco explains -

This doesn't necessarily mean that Npgsql won't work on unsupported versions. It may work if we don't add any SQL or unsupported feature. For example, today Npgsql 2.2 works only on Postgresql 8.2 and above because we added server side support for command timeout handling and some other queries which aren't supported on earlier versions.

This release also removes support for protocol 2 (used by Postgres versions below 7.4) removing a lot of legacy code (Read more about postgres protocols).

What's Next

Some interesting improvements that are in development but did not make it to this release -

You can download the latest Npgsql binaries via nuget to use them in your project.

Rate this Article

Adoption
Style

BT