Thanks a lot Michael. Get well soon. From: Michael Lewis <mlewis@xxxxxxxxxxx>
On Mon, Nov 18, 2019 at 10:10 AM Shatamjeev Dewan <sdewan@xxxxxxxxx> wrote:
As far as I understand, what you want is not possible. You cannot partition on a timestamp and then foreign key to an object_id natively. You can get around this with triggers- https://www.depesz.com/2018/10/31/foreign-key-to-partitioned-table-part-2/ -
but that would not be recommended. Admittedly, I have a pretty nasty head cold so it may be that someone chimes in with much better insight on your design. By the way, there are strong recommendations for using timestamp WITH TIMEZONE in nearly all cases. I just wanted to mention since timestamp without timezone is rarely the best choice. |