Re: best way to reference tables

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: tjo(at)acm(dot)org, dev(at)archonet(dot)com, pgsql-general(at)postgresql(dot)org
Subject: Re: best way to reference tables
Date: 2005-08-09 20:24:15
Message-ID: 20050809202415.GF21039@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Aug 09, 2005 at 04:01:33PM -0400, Tom Lane wrote:
> "TJ O'Donnell" <tjo(at)acm(dot)org> writes:
> > I guess what I'm asking is: Is there a better way to keep track of a
> > table once it's registered in my master table than just to put its
> > name in my master table? Some system oid type thing that stays fixed
> > in spite of renames or other tables mods?
>
> Yeah, you can store the pg_class OID of the table, instead of (or in
> addition to) its name. This is exactly what the system itself considers
> to be the "identity" of the table.

Maybe it is possible to use a column of type regclass to store it. Not
sure exactly what advantage that would give, but it's an idea.

--
Alvaro Herrera (<alvherre[a]alvh.no-ip.org>)
"El miedo atento y previsor es la madre de la seguridad" (E. Burke)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Guy Rouillier 2005-08-09 20:26:27 Re: How to write jobs in postgresql
Previous Message Tom Lane 2005-08-09 20:01:33 Re: best way to reference tables