0

I have a large text and I want to save them to A column in B Table using PostgreSQL. "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,

1 Answer 1

0

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.

Sign up to request clarification or add additional context in comments.

3 Comments

I can not see Blob type. When I set Blob type in my code, it automatic convert to OID type.
@user2678221, it is bytea for the actual type, as noted in the link. I apologize for the slight confusion on the terminology. You may wish to look at how to use Blob datatype in Postgres as well.
oh yeah. I used byte[] as datatype and it automatic sets 'A' column datatype as bytea. Now I am trying to read data from bytea

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.