Re: CTID: Anyway to lock it?
От | Dave Page |
---|---|
Тема | Re: CTID: Anyway to lock it? |
Дата | |
Msg-id | 03AF4E498C591348A42FC93DEA9661B8128B81@mail.vale-housing.co.uk обсуждение исходный текст |
Ответ на | CTID: Anyway to lock it? (Jim Hines <jhines@wdtv.com>) |
Ответы |
Re: CTID: Anyway to lock it?
|
Список | pgsql-odbc |
> -----Original Message----- > From: Jim Hines [mailto:jhines@wdtv.com] > Sent: 04 November 2002 19:00 > To: pgsql-odbc@postgresql.org > Subject: [ODBC] CTID: Anyway to lock it? > > > Hello, > I have a piece of software that uses specific record numbers > in order to pull > data from PG. It uses this query: > select "votes" , CTID, OID from database where ctid in ('(27, 55)')' > > Apparently the CTID changes per record with each update. Is > there anyway to > lock the CTID so that it doesn't change everytime I update a record? No, I would think not. From the docs: Ctid - The tuple ID of the tuple within its table. This is a pair (block number, tuple index within block) that identifies the physical location of the tuple. Note that although the ctid can be used to locate the tuple very quickly, a row's ctid will change each time it is updated or moved by VACUUM FULL. Therefore ctid is useless as a long-term row identifier. The OID, or even better a user-defined serial number, should be used to identify logical rows. Regards, Dave.
В списке pgsql-odbc по дате отправления: