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,
Asked
Active
Viewed 1,223 times
1 Answers
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.
-
I can not see Blob type. When I set Blob type in my code, it automatic convert to OID type. – user2678221 May 21 '16 at 02:43
-
@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](http://stackoverflow.com/questions/4386030/how-to-use-blob-datatype-in-postgres) as well. – KevinO May 21 '16 at 02:48
-
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 – user2678221 May 21 '16 at 03:19