Re: Scan by TID (was RE: [HACKERS] How to add a new build-in operator)

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
Cc: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>, pgsql-hackers <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Scan by TID (was RE: [HACKERS] How to add a new build-in operator)
Date: 1999-10-07 16:35:19
Message-ID: 199910071635.MAA01926@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

[Charset iso-8859-1 unsupported, filtering to ASCII...]
> > > I'm planning to implement a new type of scan,scan by TID.
> > > It's on TODO * Allow WHERE restriction on ctid.
> > > First,I want to define an equal operator between TID.
> >
> > Certainly, or perhaps it would be better to recycle an OID from
> > farther down? We have some open values, and if you only need a few it
> > would work well.
> >
> > You probably already know this, but just in case,
> >
> > cd src/include/catalog
> > ./unused_oids
> >
>
> I didn't know it.
> Thanks.

Oops, no mention of that in the developers FAQ. Let me do that now.

> I would use OIDs for '=' operator between TIDs as follows.
> 387 for = (tid, tid)
> 1292 for tideq(tid, tid)
>
>
> Unfortunately,TIDs are changed by UPDATE operations.
> So we would need some functions in order to get the latest
> TID of a specified tuple such as
> currtid(relationid/name, tid) which returns tid.
> I would provide functions for both relid and relname and
> use 1293-1294 for OIDs of these functions.
>
> Comments ?
> If there's no objection,I would commit them to the current tree.

Sounds good.

>
> Moreover,we would need to know TIDs of inserted tuples.
> What is a reasonable way to do so ?
> 1. Add TID to return_info of INSERT commands.
> 2. Provide a function to get TID of the last inserted tuple
> of the session(backend).

Either sounds good.

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-10-07 16:36:57 Re: [HACKERS] union and LIMIT problem
Previous Message Bruce Momjian 1999-10-07 16:17:57 Re: [HACKERS] password in pg_shadow