user2678221 user2678221 - 29 days ago 7
Java Question

How to save large text into table in PostgresSQL (using Java)

I have a large text and I want to save them to A column in B Table using PostgesSQL. "A" column type is OID, i think that if using OID datatype I can save large text. Is it exactly? Without OID, have any datatype which I can save large text? I also get this large text to display in my app. What should I do? Give me some advice.
Thank for your kindless,

Answer Source

An OID is an Object Identifier. It is designed to be used as keys.

There is a blob type. I believe you will wish to investigate using a blob. Technically, a blob is a bytea type, as indicated by the documentation. This SO question: how to use Blob datatype in Postgres provides some additional information.

If a blob does not fit your exact needs (it is binary data, but it depends on exactly what constitutes the large text; in my experience, many who believe they have text actually have some binary data), there is also a text type as well.

You may also wish to look at this SO question about text.