0

I have this very basic question but reason is I have not worked before with storing image datatype. I tried to search net but somehow not find an answer.

My question is "What will be output of a select query containing a bytea column in pgAdmin"?

I am working on a form to load image into Postgres table. The code works fine & shows record inserted. When I fetch the table data in pgAdmin, it shows [binary data] in bytea field. No string or binary data itself or address for example.

This is output of length(image_column):

enter image description here

What does this mean? Is there binary data in the field? How to view/know it if it's there.

XCeptable
  • 1,247
  • 6
  • 25
  • 49
  • I don't use pgAdmin but I would assume that if the column is `null` then pgAdmin would show something different - how are other null values displayed in pgAdmin? You can check if data is in there using `length(image_column)` in your SQL –  Nov 06 '18 at 11:14
  • @a_horse_with_no_name: I added output of length(image_column) in OP. – XCeptable Nov 06 '18 at 11:20
  • what does this conclude ? – XCeptable Nov 06 '18 at 11:21
  • It means there is data in those columns - that was your question, wasn't it? –  Nov 06 '18 at 11:23
  • Yes. Thank you for the help. It was strange to see only [binary data] in output as I was not able to conclude does this mean there is binary data in the field or it's only showing datatype bec it's empty. It should show Null I guess in case of empty but bec I didn't work with storing images, was not sure. Thank you again ! – XCeptable Nov 06 '18 at 11:27

0 Answers0