Re: Fw: OID
От | Tom Lane |
---|---|
Тема | Re: Fw: OID |
Дата | |
Msg-id | 7007.1029769441@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Fw: OID (Curt Sampson <cjs@cynic.net>) |
Список | pgsql-admin |
Curt Sampson <cjs@cynic.net> writes: > On Mon, 19 Aug 2002, Jules Alberts wrote: >> Is there any consensus aboit avoiding OIDs? I'm running a small test >> system right now using OIDs as a means to refer to BLOBs. Should I >> expect any trouble using OIDs in our future production system? > I don't know if there's a consensus, but I certainly avoid using OIDs > completely in my own tables. They're can wrap, for a start, so in a > really busy, large database you might end up getting one that you > already have. Also, I don't like "hidden" fields; if I'm going to refer > to soemething, I like it to be nice and obvious what's being referred > to. And of course they're not portable. As far as using BLOBs goes, you don't have a lot of choice: the lo_xxx family of functions take and return OID, end of story. Of course Postgres' notion of a BLOB isn't very portable anyway. I do agree that for a primary key in a user table, there's no very good reason to use OIDs rather than using a SERIAL field (ie, a sequence). regards, tom lane
В списке pgsql-admin по дате отправления: