Re: Composite types or composite keys?

Поиск
Список
Период
Сортировка
От Tony Theodore
Тема Re: Composite types or composite keys?
Дата
Msg-id 70E0B608-EB1F-4C19-98F4-6422A2B4FB63@gmail.com
обсуждение исходный текст
Ответ на Re: Composite types or composite keys?  (Chris Travers <chris.travers@gmail.com>)
Список pgsql-general
On 18 Nov 2013, at 2:24 pm, Chris Travers <chris.travers@gmail.com> wrote:
>
> I haven't done work with this so I am not 100% sure but it seems to me based on other uses I have for table
inheritancethat it might work well for enforcing interfaces for natural joins.  The one caveat I can imagine is that
thereare two issues that occur to me there. 
>
> 1.  If you have two child tables which add a column of the same name, then your centralized enforcement gets messed
upand you have a magic join which could take a while to debug.... 
>
> 2.  The same goes if you have two child tables which also inherit a different parent table for a different natural
join....
>
> To be honest I think being explicit about joins is usually a very good thing.

I can see how debugging a magic join would quickly outweigh any benefits and the “USING()” clause nicely reflects the
foreignkey definition, so I’ll stick with explicit joins. 

Thanks,

Tony



В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: What does this error message mean?
Следующее
От: Ken Tanzer
Дата:
Сообщение: Re: What does this error message mean?