Re: relid of non user created tables

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Deepak S <in(dot)live(dot)in(at)live(dot)in>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: relid of non user created tables
Date: 2015-02-11 20:44:56
Message-ID: 54DBBF48.8040004@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2/7/15 5:55 AM, Tom Lane wrote:
> Deepak S <in(dot)live(dot)in(at)live(dot)in> writes:
>> I wish to know if it is safe to assume that non user created tables always have a relid of less than 10,000 (I chose this value after trial and error).
>
> Depends what you consider "user created". System catalogs with
> manually-assigned OIDs will have OIDs below 10K, but initdb creates
> numerous things that don't have manually-assigned OIDs. And what of,
> say, TOAST tables attached to user tables?
>
> You might find the comments for FirstNormalObjectId in
> src/include/access/transam.h enlightening.

I think the better question is "Why do you want to know this?" I suspect
there's a better way to do whatever you're trying to do.
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-02-11 20:49:17 Re: Parallel Seq Scan
Previous Message Jim Nasby 2015-02-11 20:34:17 Re: Proposal : REINDEX xxx VERBOSE