how can i store an image in my postgresql database? I want to save some data in my module's form like an image. 

In fact i want to store an image in my Postgresql database.
You need the Storage API module.

This allows you to set a field's upload destination to a custom storage class, one of which is database.

I've used this module for this exact purpose and worked well.