Re: BLOB or BYTEA field
От | Jonathan Bartlett |
---|---|
Тема | Re: BLOB or BYTEA field |
Дата | |
Msg-id | Pine.GSU.4.44.0302191423130.20576-100000@eskimo.com обсуждение исходный текст |
Ответ на | Re: BLOB or BYTEA field (cnliou9@fastmail.fm (CN)) |
Список | pgsql-general |
BLOBs are actually created using lo_create - you are then returned an OID that can essentially be used as a file descriptor. However, in my programs, I've opted for bytea for the following reasons: * You can't query for BLOBs and know if there is a dangling reference * BLOBs use OID fields. Running out of OIDs is a problem in PostgreSQL because they are only four bytes wide. This makes BLOBs useless for large databases. * bytea fields are easier to manipulate I think I had some other reaons, but I can't think of them right now. I also just liked storing the binary object itself as an attribute rather than a somewhat dangling entity. Jon On 18 Feb 2003, CN wrote: > Hi! Daniel, > > > > > you should use oid Fields for BLOBS. That works well. > > > > I have the same question. Could you make it more specific? oid is an > unsigned 4 bytes integer. How do you save binary data from Delphi in > bytea column "using oid fields"? > > Thanks you! > > CN > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org >
В списке pgsql-general по дате отправления: