Search Postgresql Archives

Re: Foreign key constraint question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux