Search Postgresql Archives

Re: Composite types or composite keys?

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

 



On 18 Nov 2013, at 2:24 pm, Chris Travers <chris.travers@xxxxxxxxx> 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 inheritance that it might work well for enforcing interfaces for natural joins.  The one caveat I can imagine is that there are 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 up and 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 foreign key definition, so I’ll stick with explicit joins.

Thanks,

Tony



-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general





[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