As of my understanding, if you are not embedding Postgresql in your solution and then selling it, you are not infringing any copyright by using Postgresql in your architecture, and so you are entitled to use it freely (A) and without having to share your source code (B).