2

The column contains images as blob I want to get the size of the image with the maximum size. How can I get this?? I do Select max(photo) from table;

Rahul
  • 895
  • 1
  • 13
  • 26
  • Ok, you want. What is the type of the `photo` column? There are at least two way to store binary data in the PostgreSQL: [`bytea`](https://www.postgresql.org/docs/current/datatype-binary.html) and [LOB](https://www.postgresql.org/docs/current/lo-funcs.html) – Abelisto Dec 29 '20 at 10:52
  • it is a lob/oid – Rahul Dec 29 '20 at 10:56
  • Iin this case `max(photo)` is nothing about the photo's size. Just only about ID. Quick search: https://stackoverflow.com/questions/10169309/get-size-of-large-object-in-postgresql-query#10171306 – Abelisto Dec 29 '20 at 11:14
  • PS: Try to store photos in the `bytea` column. Yes I know some people who prefered to store 10 mb in `bmp` format in its VC. Actully [#uck them all](https://www.youtube.com/watch?v=9TyqtWUTj6M) – Abelisto Dec 29 '20 at 11:37
  • yes it does thanks a lot – Rahul Jan 01 '21 at 16:36

0 Answers0