Re: [GENERAL] Foreign key against a partitioned table

2016-08-23 Thread Craig James
[GENERAL] Foreign key against a partitioned table > > > > How do you create a foreign key that references a partitioned table? > > > > I'm splitting a large table "molecules" into 20 partitions, which also has > an associated "molecular_properties"

Re: [GENERAL] Foreign key against a partitioned table

2016-08-23 Thread Adrian Klaver
On 08/23/2016 01:00 PM, Craig James wrote: How do you create a foreign key that references a partitioned table? I'm splitting a large table "molecules" into 20 partitions, which also has an associated "molecular_properties" table. It looks something like this (pseudo-code): create table mol

Re: [GENERAL] Foreign key against a partitioned table

2016-08-23 Thread Adam Brusselback
I have wondered if there were any plans to enhance fkey support for partitioned tables now that more work is being done on partitioning (I know there has been a large thread on declarative partitioning on hackers, though I haven't followed it too closely). Foreign keys are all done through trigger

Re: [GENERAL] Foreign key against a partitioned table

2016-08-23 Thread Igor Neyman
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Craig James Sent: Tuesday, August 23, 2016 4:00 PM To: pgsql-general@postgresql.org Subject: [GENERAL] Foreign key against a partitioned table How do you create a foreign key that references a

[GENERAL] Foreign key against a partitioned table

2016-08-23 Thread Craig James
How do you create a foreign key that references a partitioned table? I'm splitting a large table "molecules" into 20 partitions, which also has an associated "molecular_properties" table. It looks something like this (pseudo-code): create table molecules(molecule_idinteger primary key,