Re: OID's

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: OID's
Date: 2004-11-16 20:44:43
Message-ID: 8765458qx0.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Matt <matt(at)kynx(dot)org> writes:

> I ask because I'm currently using them to join a single table to rows in
> arbitrary tables, something like:
>
> +-------------+
> | JOINME |
> +-------------+
> | foreign_oid |
> | foreign_id |
> | ... |
> +-------------+
>
> Where foreign_oid is the tableoid of the table and foreign_id is the
> (serial, not oid) id of the row in that table.
>
> I dunno if it's bad design, but it's darn handy.

How do you make use of this? It seems like you would need your code to know
which foreign_oid referred to which table to actually perform the join.

--
greg

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-11-16 20:56:00 Re: How to overload POSITION
Previous Message Bernd Helmle 2004-11-16 20:43:24 Re: Fwd: Problem installing Postgresql on MDK10.0