When upload the file we can save the file in postgres by pack the file and store the content in database, for that we can use pack() function available in PHP. Similary we can use unpack() function for retriving the file and download it.
My question what datatype we will use for storing the packed file in postgresql database.
We will use bytea available in postgre, but it is not an efficient use. Because when pack the image file as uploaded in PHP. Its size is around 2 MB. That is it exists the maximum file size in PHP. But the file size is 900KB only.
I need another method to store file in postgre sql database.