Answer the question
In order to leave comments, you need to log in
What data type to use for a PDF file in Postgres?
Hello! in Kirov -25)) Heat everyone!!,
What data type to use when creating a table in Postgresql for PDF storage (I'm doing a project for myself).?
What data type to use when creating a table in Postgresql to store PICTURES (jpg).
Answer the question
In order to leave comments, you need to log in
If the file is small, then you can stuff it into a field like bytea
create table images(id int, image bytea);
insert into images values (1, pg_read_file('/path/to/image.jpg')::bytea);
create table images (id int, image oid);
insert into images values (1, lo_import('/path/to/image.jpg'));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question