If I wanted to track smart contract events in postgres, how is this done? From reading https://medium.com/@ASvanevik/how-to-get-any-ethereum-smart-contract-into-bigquery-in-8-mins-bab5db1fdeee it appears you must scan the logs table. Is there any example on how to do this?