Yes, PostgreSQL is free, and code is available to use for everyone. It allows users to do anything they want with the code, including reselling binaries without the source code; thus, its free for all users, both proprietary and open source.