type bytea and large objects
От | Mateu Batle |
---|---|
Тема | type bytea and large objects |
Дата | |
Msg-id | 3A3FCB15.5060700@iname.com обсуждение исходный текст |
Список | pgsql-general |
Hi all, I'm pretty new in PostgreSQL and I have some problems and questions. I'll list them here, maybe someone can help me :) 1) I wanted to use a binary type. I've seen in some place a type called bytea which I can use, but I cannot use it as a primary key. Is that possible somehow or with another type ? The message I get when trying to use it as primary key is: ERROR: DefineIndex: type bytea has no default operator class 2) If I use '\000' in a bytea string, what comes after the nul value is really stored in the database ? 3) Because of these problems I have used text instead of bytea and used base 64 encoding. The size of a row is limited to 8 Kbytes, so I'm also using large objects (BLOB) in the case is larger. But large objects are implemented using files in the filesystem, which I think is a bit poor in performance. With the current large object API is only possible to grow the large objects, but no to shrink them. Is there any way to do a truncate operation on a large object ? Cheers, Mateu
В списке pgsql-general по дате отправления: