Npgsql.
Here you will find info about me and the development projects I work on
If you liked this blog, you should follow me on twitter or on Google+
' />

Francisco Figueiredo Jr Activities

Homepage  Xml - Vorschau mit Bildern

Happy 20th Anniversary, Npgsql!
     Happy 20th Anniversary, Npgsql!    It seems like yesterday when I decided to start Npgsql. And today, Npgsql completes 20 years since the first public beta release!    On May 18th, 2002, this is what was written in the first release notes of Npgsql  version 0.1: 2002-05-18        First Npgsql beta release.    In this version there is a limited functionality. It is only possible to connect and disconnect from server.    Only clear text authentication is supported right now.    To compile you can use the SharpDevelop to open the Combine file (Npgsql.cmbx) ortype at command console: csc /t:library /out:Npgsql.dll NpgsqlConnection.cs AssemblyInfo.cs NpgsqlException.csThis will create the file Npgsql.dll that can be copied to the application directory.    I will be working in the Command functionality now.            Play with it and send your bugs and comments :)    (fxjr)         It's been a long journey since then. And what a journey!! :)    It all started when I decided to contribute to the open source community after so much time learning from it.    At the time, ( year 2002 ), .Net was in its infancy but it looked very promising. Then I decided to create this new project in C#.    As I wanted to play with network protocols and I also enjoyed working with databases, I started to check if there were .Net Data Providers for some open source database servers.  I ended up picking Postgresql because the communication protocol was very well documented.    To me, this project is the most important contribution I have ever made to the opensource community. I'm very proud of it! :)    I'm specially happy because since the beginning, Npgsql is like a reference in the .Net world when talking about connecting to Postgresql.     Of course, all this wouldn't be possible without the help of a lot of people. I'd like to thank everybody who helped to make Npgsql the success it is today!     Thank you!     Here is a list ( I know it is far from complete, sorry if I missed your name ) of some persons who helped Npgsql to be what it is today: ( I took most of this list from Npgsql1 repository ):Dave Page - He was like a mentor for me in the early days. Helped me a lot how to manage an opensource project. Josh Cooley - He made a lot of contributions and also made a presentation of Npgsql with me at PGCon 2008!Brar PieningHiroshi Saito - He also made a presentation of Npgsql with me at PGCon 2008!Daniel MorganBen ClewettUlrich SprickJon AsherChris MorganThilo UtkeGlen ParkerShay Rojansky - who is helping taking Npgsql to levels that I never thought was possible!    So, that's it. I just wanted to create a special post for this day!    Thank you all for reading this far. I'll make some other posts talking about Npgsql history.

It's been a long time....
Hi, all!! It's been a long time since the last time I posted here... Wow, almost 6 years!!  What have I been doing all this time, you may wonder... Well, I've been studying a lot and playing with other projects besides Npgsql, which btw is in excellent Shay Rojansky's hands.  So, what I've been up to, you may ask? Well... I've been playing with mobile development. More specifically Android Development. And I've already published some apps to Play Store. I'll talk more about them in future posts. Just wanted to let you know that I'm back to blogging and will keep posting about my projects again.  Thanks for reading!

Npgsql 2.2.0 final release is out!
This is Npgsql 2.2.0 Final Release This release contains 249 commits since the last stable release. Includes bug fixes, improvements and new features. Update notice: If you have been using Npgsql 2.2.0-rc2, you don't need to update to this version. They are the same except for the Assembly version information. Major highlights Visual Studio DDEX support   Kenji Uno added support for DDEX. Now you can use Npgsql with Visual Studio data designer. This is a missing feature a lot of our users requested in the past. Kenji added a tutorial about how to use Npgsql with DDEX. You can find it here: https://github.com/npgsql/Npgsql/wiki/Visual-Studio-Design-Time-Support---DDEX-Provider#install-npgsqlddexprovidervsix   Entity Framework   David Karlaš added support for EFMigration and Database creation in EF6+. Now it is possible to start Code First projects without needing to create a database upfront. EntityFramework and Npgsql will take care of it. Emil Lenngren added support for a lot of missing features of EntityFramework. A list containing fixes from David and Emil as well as others for EntityFramework can be seen here: https://github.com/npgsql/Npgsql/issues?direction=desc&labels=entity+framework&milestone=2&page=1&sort=created&state=closed   SSLStream support   In this release, SSLStream is on by default. If you want to use Mono.Security, you will need to use the following line in your code: NpgsqlConnection.UseSslStream = false; Note that in future releases, this option may not be available anymore as we are removing the dependency on Mono.Security assembly. Let us know in the forums if you have any problem with ssl when using SSLStream. This will help us check if we will be able to remove Mono.Security assembly.   Added support for JSON, JSONB and HSTORE datatypes Shay added support for those datatypes.   Added GSSAPI support on Windows Brian Crowell added support for GSSAPI on windows. Now it is easier to use Active Directory when authenticating users.   Removed support for protocol v2 Postgresql versions which use only protocol 2 are very old and don't receive support from postgresql group anymore. By removing support for protocol version 2, we removed a lot of code and can focus on functionalities provided by protocol 3.   Removed support for Postgresql 8.4 and below In this thread, we talked about making Npgsql support the officially supported postgresql versions. we talked about making Npgsql support the officially supported postgresql versions. Postgresql has a table of officially supported versions and we decided to follow this table to guide us which postgresql version we will have support to. 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. If you are using earlier postgresql versions, please, use an older version of Npgsql. We are creating a compatibility table to show which Postgresql version Npgsql works with.   Fixed bugs: [#91] Support for EFMigration and Database creation [#152] NpgsqlInterval different constructors different ToString [#158] NpgsqlCommand.Dispose() should execute "DEALLOCATE " for a prepared command [#177] XML data type doesn't seem to be quoting parameters properly on insert [#179] NpgsqlCommandBuilder automatic sql commands configuration [#188] Buffer too small problem in NpgsqlCopySerializer [#201] Dynamic type parameters: Cannot cast System.Int32 into any valid DbType after upgrading from 2.0.14.3 to 2.1.2.0 [#208] ObjectDisposeException [#217] Impossible to insert a Double.NaN value [#219] [#1011005] using 2 NpgsqlCopyIn at the same time [#223] HasRows property's bug [#231] NpgsqlParameterCollection.Clear() doesn't reset NpgsqlParameter.Collection [#225] Handle IEnumerable parameter [#233] Cannot insert to tables which have only one column [#246] Take followed by Skip is generated incorrectly in Entity Framework [#262] FirstOrDefault() on navigation property subquery throws “Not Implemented” Exception [#264] Mono.Security is outdated [#269] Fix 's' value mapped to the 'a' byte [#280] Bad SQL produced when selecting a field that was also used in the orderBy of a let subquery [#287] Fix operator handling and date functions for EF [#296] parameter parsing fails (regression) and duplicate [#240] NpgSqlCommand does not substitute parameters when there is a string with escaped apostrophe [#315] Fix query parameter processing to more correctly match PostgreSQL's lexer A list of the issues and pull requests merged for this release can be found at github here: https://github.com/npgsql/Npgsql/issues?direction=desc&milestone=2&page=1&sort=created&state=closed   Known Issues There are some issues we are working for the next maintenance release 2.2.1. You can check which issues we are working on here: https://github.com/npgsql/Npgsql/issues?q=milestone%3A2.2.1   Thanks I'd like to give a special thanks to Kenji Uno for his excellent work with Npgsql DDEX support. DDEX support was one of the biggest missing features of Npgsql. I'd like to thank Emil Lenngren for all his work with Entity Framework improvements and insightful comments, David Karlaš for his help with Entity Framework support. Shay Rojansky, Glen Parker and Josh Cooley for all contributions and comments, and a big thanks to all the other contributors who helped us to make this release.   Downloads Downloads are available on Nuget, github and pgfoundry. Please, give it a try and let us know what you think. Drop by our user forums to discuss or send your bug reports to our issues section on github.    List of contributors for this release Kenji Uno Shay Rojansky Glen Parker Emil Lenngren David Karlaš Brian Crowell danzel Tuan Nguyen windcloud asgeirh Frans Bouma Jaspalsinh Chauhan Josh Cooley Martin Willey Francisco Figueiredo Jr. shankbond Javier Torres Kevin Pullin Michael de Lang Oskar Gewalli Sunny Ahuwanya Thomas Radioyes javitonino mw samy

Npgsql 2.2.0 Release Candidate 1 released!
This release contains 22 commits since the last release. It contains the following bug fixes: [#217] Impossible to insert a Double.NaN value [#179] NpgsqlCommandBuilder automatic sql commands configuration [#158] NpgsqlCommand.Dispose() should execute "DEALLOCATE " for a prepared command [#264] Mono.Security is outdated [#296] parameter parsing fails (regression) and duplicate [#240] NpgSqlCommand does not substitute parameters when there is a string with escaped apostrophe A complete list of commits for this release can be found here: v2.2.0-beta1...release-2.2.0

Npgsql 2.2.0 beta1 released!
The Npgsql Development team is proud to announce that Npgsql 2.2.0 beta1 is now available! This release has the following highlights: Visual Studio DDEX support Kenji Uno added support for DDEX. Now you can use Npgsql with Visual Studio data designer. This is a missing feature a lot of our users requested in the past. Kenji added a tutorial about how to use Npgsql with DDEX. You can find it here. Support for EFMigration and Database creation in EF6+ David Karlaš added support for that. Now it is possible to start Code First projects without needing to create a database upfront. EntityFramework and Npgsql will take care of it. Emil Lenngren added support for a lot of missing features of EntityFramework. Check out this list containing fixes from David and Emil as well as others for EntityFramework. SSLStream support In this release, SSLStream is on by default. If you want to use Mono.Security, you will need to use the following line in your code: NpgsqlConnection.UseSslStream = false; Note that in future releases, this option may not be available anymore as we are removing the dependency on Mono.Security assembly. Let us know in the forums if you have any problem with ssl when using SSLStream. This will help us check if we will be able to remove Mono.Security assembly. Added support for JSON, JSONB and HSTORE datatypes Shay added support for those datatypes. Added GSSAPI support on Windows Brian Crowell added support for GSSAPI on windows. Now it is easier to use Active Directory when authenticating users. Removed support for protocol v2 Postgresql versions which use only protocol 2 are very old and don't receive support from postgresql group anymore. By removing support for protocol version 2, we removed a lot of code and can focus on functionalities provided by protocol 3. Removed support for Postgresql 8.3 and below In this thread, we talked about making Npgsql support the officially supported postgresql versions. Postgresql has a table of officially supported versions and we decided to follow this table to guide us which postgresql version we will have support to. 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. If you are using earlier postgresql versions, please, use an older version of Npgsql. We are creating a compatibility table to show which Postgresql version Npgsql works with. Complete release notes for this release can be found on our github release page. Downloads Downloads are available on Nuget, github and pgfoundry. Please, give it a try and let us know what you think. Drop by our user forums to discuss or send your bug reports to our issues section on github.

Using Entity Framework 6 with Npgsql 2.1.0
UPDATE (2014-05-19): Marek Beneš noticed a problem in the default connection factory config. It is fixed now. Thanks, Marek! UPDATE (2014-02-20): I created a new post explaining how to get Npgsql 2.1.0. Although this post is about EF 6, I'd like to talk about our current situation to support both EF 6 and EF4.x which explain why there are some subtle changes between EF 4.x and EF 6.x App.config settings.  Support for EF versions 4.x and 6.x Sometime after we started to work on Npgsql 2.1.0, we started to add code to support EF6 and decided to reorganize our Entity Framework support code. Shay created a pull request to organize this change and isolate the EF code out of core Npgsql code. The result was the creation of two separated assemblies: Npgsql.EntityFramework.dll for EF6 and above; Npgsql.EntityFrameworkLegacy.dll for EF4.x. Only when using Npgsql with EF6 you will need to reference Npgsql.EntityFramework.dll assembly. This is needed because the EF system has to find it in order to use it. When using EF 4.x, you won't need to reference Npgsql.EntityFrameworkLegacy.dll. Npgsql will load it using reflection. You just need to make sure the assembly is located at the same place as Npgsql.dll. With this approach, using EF 4.x with 2.1.0 will be the same way as using with previous versions of Npgsql. In order to facilitate how to configure Npgsql 2.1.0 to work with EF6, I'm pasting* below an App.config template which you can use as a starting point(1). Configuration settings for EF 6 <xml version="1.0" encoding="utf-8"?> <configuration>   <configSections>     <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework,  Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />   </configSections>   <startup>     <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />   </startup>   <entityFramework>     <providers>       <provider invariantName="Npgsql" type="Npgsql.NpgsqlServices, Npgsql.EntityFramework"></provider>     </providers>     <defaultConnectionFactory type="Npgsql.NpgsqlConnectionFactory, Npgsql" />   </entityFramework>   <system.data>     <DbProviderFactories>       <remove invariant="Npgsql" />       <add name="Npgsql Data Provider" invariant="Npgsql" support="FF" description=".Net Framework Data Provider for Postgresql"   type="Npgsql.NpgsqlFactory, Npgsql" />     </DbProviderFactories>   </system.data> </configuration> *Sorry for the bad formatting :( The most important change from previous configuration files is the provider entry which had its type changed from Npgsql.NpgsqlFactory to Npgsql.NpgsqlServices as well as the location of this type which used to be in the Npgsql assembly and now it is located at the Npgsql.EntityFramework assembly. With those changes, you will be able to use Npgsql 2.1.0 with EF6 without any problem. Let me know in the comments if you have any problem with those directions. In a later post I'll show a step by step on how to use Npgsql 2.1.0 with EF 6 and some exciting features we are working on: Support for EFMigration and Database creation and Returning DB generated values on insert for EF --------------------------------- 1. Another option to have those configurations set up is to install the Nuget Npgsql.EntityFramework package. Shay added a script which configures the App.config file and add the needed entries in order to make it work with Npgsql.

Initial Visual Studio Design time support added to master branch!
Achievement unlocked! With the merge of Pull Request #213 (PR #213), Kenji Uno added support for Visual Studio Design Time also known as DDEX.  A most wanted feature From the statistics of pageviews I get from a previous post about design time support, I can affirm that this is a most wanted feature of Npgsql. And I'm very glad to say that Npgsql is finally having it. I'd like to thank Kenji Uno for all his hard work to make this happen.  Npgsql DDEX support is done through an extension file which can be easily installed in Visual Studio. This is a much better situation than we had before where it was needed to use an experimental instance of Visual Studio.  History The code started with wwindcloud in PR #67 and Kenji started to play with it and said he was working to get it usable in VS2012 and 2013.  Some time later, Kenji said he had some success to get Npgsql DDEX initially working and started to fix the bugs he was finding.  In order to be able to add more fixes to the code, Kenji started the PR 213 and started to add more features and fixes until now when we merged all the changes back to master branch. How to use it Kenji Uno wrote a tutorial about how to build and use this feature. Below are some screenshots from the tutorial. Please, give it a try and let us know if it works for you. Remember that this is a work in progress, so you may face bugs and problems.  I'd like to thank Kenji Uno for all his hard work to get this feature working. And also thank wwindcloud for the initial work. Sample screenshots Here is an screenshot when you double click the .vsix file to install the extension: When you install it, you will be able to select it when creating a new data source connection:

Npgsql 2.1.3 released!
This version restores the @@ operator support removed in the previous version. Thanks Glen Parker who provided a fix. Downloads can be found at the usual locations: github download page and the nuget repository. Pgfoundry will be updated soon.

Npgsql 2.1.2 released!
Npgsql 2.1.2 is out! This is a bug fix release. Two fixes are present: KeyNotFoundException when setting ApplicationName on NpgsqlConnectionStringBuilder and  A regression when using NHibernate with queries containing '<' operator. (Less Than' prepare failing). Unfortunately, this fix breaks previous support for @@ operators. So if you need this support, you will have to use the previous 2.1.1 version. Glen Parker is working in a permanent fix. Sorry for this big inconvenience. More info about that can be found at the link above. Please, give it a try and let me know if you have any problems. Please, report your issues in our github issues page.

Npgsql 2.1.0 released!
After a long time, Npgsql 2.1.0 is finally released!  If you have been following my posts about Npgsql 2.1 beta and rc releases, you know we did a lot of changes since our last stable release. The change log for this version is big. You can find a complete list of what has changed and the bugs fixed in the github project release page. It has a lot of information about the changes we made since our last stable 2.0.14 release. You should check it out to see what changed and what new features you will get when you use 2.1. Developers using Npgsql 2.1 and Entity Framework should pay attention to the changes related to new configuration settings. More information about those changes can be checked here. Downloads are available on Nuget, github. pgfoundry downloads will be made available soon. Finally, I'd like to thank some people who did an incredible job and that without them this release wouldn't be possible! Glen Parker has been working in the optimizations tasks since his first git commit. From the changelog you can see his tireless work regarding each part of Npgsql which could be optimized. Thank you very much for your contributions, Glen! Shay Rojansky has been helping as the mastermind of the project restructuring support. He contributed a lot of changes which made our lives working with Npgsql much better. Thanks to him we can compile Npgsql for different .net platform versions easily. He also got TeamCity build server working as well as github integration. He helped us to get EntityFramework pre-6 and pos-6 verions easily integrated. Thank you, Shay! And Dave Page who helped us with the server where the TeamCity is installed. Without his help, I'm sure our TeamCity installation would be much more difficult. Thank you, Dave! Please, give it a try and let us know what you think. Drop by Npgsql user forums to discuss and comment or send your bug reports to our issues section on github. 

Npgsql 2.1 Release Candidate 1 released!
Today we released Npgsql 2.1 RC1. This release has very few fixes since Beta1. In fact, only two: Fixed bugs: #141 AlwaysPrepare does not works in some cases. Thanks @avb1987. #153 Fixed wrong comma putting in AddFunctionColumnListSupport(). Thanks @tyler-nguyen. The changelog of the Beta1 is way bigger and has a lot of information about the changes we made since our last stable 2.0.14 release. You should check it out to see what changed and what new features you will get when you use 2.1. We will have the final version release in the beginning of March. Downloads are available on Nuget, github and pgfoundry. You may want to check my previous post about how to get Npgsql 2.1 beta1. The instructions there also apply to 2.1 rc1. Please, give it a try and let us know what you think. Drop by our user forums to discuss or send your bug reports to our issues section on github. 

How to get Npgsql 2.1.0 beta
In my last post, I talked about how to use Npgsql 2.1.0 and showed an App.config file which you could use as a template for your applications which use Entity Framework 6. Npgsql 2.1.0 didn't have a stable release yet. It is currently in beta (and shortly in RC). You can download it from the following sources: Nuget As already mentioned, Npgsql 2.1.0 didn't have a stable release yet, so you will need to ask Nuget to install a pre-release version of Npgsql. You do that with the following nuget command: PM> Install-Package Npgsql -Pre If you plan to use Entity Framework 6, you will also need to download the Npgsql.EntityFramework assembly. This is done with the following nuget command: PM> Install-Package Npgsql.EntityFramework -Pre If you plan to use Entity Framework 4.x, you will need to download Npgsql.EntityFrameworkLegacy. Install it with the following nuget command: PM> Install-Package Npgsql.EntityFrameworkLegacy -Pre GitHub You can download zip files of all the assemblies for many .net platform versions in our releases page at GitHub. PgFoundry.org You can download zip files of all the assemblies for many .net platform versions in our release pages at pgfoundry.org .

New developer and user discussion groups available!
Npgsql has new developers and users communication channels. Shay Rojansky created two new discussion groups for Npgsql: npgsql-dev and npgsql-help. Those groups will be used in place of the Npgsql-devel mailing list and the forums available on pgfoundry.org respectively. Please, feel free to send your questions and comments to those groups. We hope those groups are very helpful to users looking for Npgsql support.

Npgsql 2.0.14 released!
Update (2013-12-22): 2.0.14.3 was released with a fix for entity framework boolean value handling. See this issue and this commit for more info about this fix. Package zip files are already available from pgfoundry and github. * * * After a lot of time since last stable release, Npgsql 2.0.14 is out! This is a small bugfix release with fix for hangs which could happen when connecting to Postgresql 9.3.  This bug appeared when Postgresql sent an error message. Npgsql had a problem handling some error code fields and then hang while processing it. Whooops! :)  Thanks to Glen Parker, it is fixed on github.  If you are having hang problems while using Npgsql after upgrade the server to 9.3 version, this version is for you. 2.0.14? Those who are paying attention to the version number may have noticed that the version number is 2.0.14 and not 2.0.13 as it should be. After all, we already had a 2.0.13-beta1 released.  The fact is that after 2.0.13-beta1, we had a lot of changes. From performance tweaks to better Entity Framework support and many other changes that we decided to skip 2.0.13 and call it Npgsql 2.1! Yes, you read it right. After so many years in the 2.0.x versions, we will ship our first 2.1 version. I'll post more info about it in a future post. I hope this version number change doesn't give too much confusion. You can grab Npgsql 2.0.14 from nuget repository. You can install it directly from Visual Studio and Xamarin Studio through Nuget Package Manager. We are also packing zip distributions to put on our downloads section. We are having some problems with our downloads host but as soon as we get them available I'll update this post. They are already available at pgfoundry and github. As always, send your comments and feedback about this release. They are very welcome and will help us to get more goodies in your hands on next releases.

2.0.13-beta1 Nuget packages available!
After a long delay, Nuget packages for 2.0.13-beta1 are finally available! Since they are beta, you will need to use a command line parameter when installing this package. According to Nuget, you will need to use the following command: PM> Install-Package Npgsql -Pre Please, give it a try and let me know if it works ok. This package also fixes the problem of police files compiled to .Net 2.0 framework only. This was giving problems when installing Npgsql on .net 4.0 runtimes. Thanks Yusuke Fujiwara for fixing it.


1 2