On Jul 22, 2007, at 10:35 AM, Alvaro Herrera wrote:
Nis Jørgensen wrote:
Alvaro Herrera skrev:
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 w
Nis Jørgensen wrote:
> Alvaro Herrera skrev:
> > 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 s
Well, what about using inheritence and relation identifiers?
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org/
Alvaro Herrera skrev:
> 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
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 addin
Perry Smith wrote:
I want to do something like this:
ALTER TABLE companies ADD CONSTRAINT fk_companies_item_id
FOREIGN KEY (item_id, 'Company')
REFERENCES item_bases(item_id, item_type)
INITIALLY DEFERRED
I could add a column to companies that is always se
Jeff Davis skrev:
> On Fri, 2007-07-20 at 19:18 -0500, Perry Smith wrote:
>>> The relational model handles inheritance and polymorphism very well if
>>> you don't store types as values.
>> What if I have just an id for an item? This will happen when another
>> table references an item. How do I
On Jul 20, 2007, at 19:37 , Jeff Davis wrote:
I only mentioned it because in 8.3 it will be useful for general
use. I
don't know what's changing about it between now and then, but it's
becoming "un-deprecated".
AFAIK, nothing's changed in the actual constraint trigger code: it's
just a do
On Fri, 2007-07-20 at 19:18 -0500, Perry Smith wrote:
> > The relational model handles inheritance and polymorphism very well if
> > you don't store types as values.
>
> What if I have just an id for an item? This will happen when another
> table references an item. How do I know what type it
On Jul 20, 2007, at 7:01 PM, Jeff Davis wrote:
On Fri, 2007-07-20 at 09:27 -0500, Perry Smith wrote:
On Jul 20, 2007, at 9:06 AM, Michael Fuhr wrote:
On Fri, Jul 20, 2007 at 08:57:25AM -0500, Perry Smith wrote:
I want to do something like this:
ALTER TABLE companies ADD CONSTRAINT fk_compa
On Fri, 2007-07-20 at 09:27 -0500, Perry Smith wrote:
> On Jul 20, 2007, at 9:06 AM, Michael Fuhr wrote:
>
> > On Fri, Jul 20, 2007 at 08:57:25AM -0500, Perry Smith wrote:
> >> I want to do something like this:
> >>
> >> ALTER TABLE companies ADD CONSTRAINT fk_companies_item_id
> >> F
On Jul 20, 2007, at 9:06 AM, Michael Fuhr wrote:
On Fri, Jul 20, 2007 at 08:57:25AM -0500, Perry Smith wrote:
I want to do something like this:
ALTER TABLE companies ADD CONSTRAINT fk_companies_item_id
FOREIGN KEY (item_id, 'Company')
REFERENCES item_bases(item_id, it
On Fri, Jul 20, 2007 at 08:57:25AM -0500, Perry Smith wrote:
> I want to do something like this:
>
> ALTER TABLE companies ADD CONSTRAINT fk_companies_item_id
> FOREIGN KEY (item_id, 'Company')
> REFERENCES item_bases(item_id, item_type)
> INITIALLY DEFERRED
I want to do something like this:
ALTER TABLE companies ADD CONSTRAINT fk_companies_item_id
FOREIGN KEY (item_id, 'Company')
REFERENCES item_bases(item_id, item_type)
INITIALLY DEFERRED
I could add a column to companies that is always set to "Company" but
14 matches
Mail list logo