ADDITIONAL METHODS

upsert_subnet( $net, $now )

Records $net as seen at $now, adding the row if it is new. One statement, so two pollers that see the same new subnet at once cannot both try to insert it.

$now must be one of the timestamp forms accepted by upsert, such as LOCALTIMESTAMP or to_timestamp(1)::timestamp.