I share the same sequences across 3 tables and have a COPY that send data to one of those tables. That table has a before insert trigger function that looks for a condition and redirect records to the other two depending on that condition result. Sharing the sequence is needed to act as a primary key for the view that UNION ALL's the tables. Since I'm posting all the data from one COPY command, the sequence number is duplicated in the tables. Should I move the moving the trigger function to after, which would require me to delete entries that get moved -or- separate the different data into separate incoming COPY commands? Anyone have suggestions on how I would best achieve what I'm looking to do. Thanks, -- Robert
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера