I\'m creating a website using WooCommerce and I want to restrict the available products to users depending on the postcode that they enter in the search form on my home page
I would recommend using WordPress custom fields to store eligible postcodes for each product. add_post_meta() and update_post_meta are what you're looking for. It's not recommended to alter the default WordPress table structure. All postmetas are inserted in wp_postmeta table. You can find the corresponding products within wp_posts table.