Tony Wasson wrote: >You can use the merge trigger below to do this. You'll need to add >some code to update the count. You may also benefit from using the new >constraint exclusion (table partitioning) in PostgreSQL 8.1. I am not >sure if CE works against the inet datatype -- if not, try converting >the IP to an integer. > > CE looked like it was just for parent/child relationships ... did I read that right? I'm not sure how it applies. And the table partitioning looks like its still on the todo list ... is that really the case? And as for getting data into the DB ... from earlier posts it sounded like standard practice was to bulk load the new data into a temporary table and then do an INSERT ... SELECT to load the data into the new table. Is this still the case with the trigger, or can/should I just COPY the data straight into the final database? And I assume that I should *not* delete my indexes while I'm loading the table, since the queries in the trigger can take advantage of them ... right? Also, as a slight aside, has anyone created a data type for single IPs that is essentially an integer (i.e. 4 bytes) that works with the standard functions for INET? -Mike ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your message can get through to the mailing list cleanly