Re: Foreign key constraint question

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Nis Jørgensen <nis(at)superlativ(dot)dk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Foreign key constraint question
Date: 2007-07-22 03:32:09
Message-ID: 20070722033209.GD2902@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Nis Jørgensen wrote:

> What if, for instance, I want to render a list of shapes?
>
> To render the shape, I need to get its data, to get its data, I need to
> know what type it is. ISTM that the easiest way to achieve this is
> storing the type info at the "top" of the table hierarchy.

Try adding "tableoid" to the list of columns retrieved. Even better,
cast that to regclass.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2007-07-22 03:41:02 Re: encodings
Previous Message Arnaldo Gandol 2007-07-22 02:54:35 posgres tunning