title: Are these indexes doing the same thing in respect to customer_id?
body: <p>I'm pretty new to PostgreSQL so apologies if I'm asking the obvious.</p>
  
  <p>I've got a table called <code>customer_products</code>. It contains the following two indexes:</p>
  
  <pre><code>CREATE INDEX customer_products_customer_id
     ON public.customer_products USING btree (customer_id)
  
  CREATE UNIQUE INDEX customer_products_customer_id_product_id
     ON public.customer_products USING btree (customer_id, product_id)
  </code></pre>
  
  <p>Are they both doing the same thing in respect to <code>customer_id</code> or do they function in a different way? I'm not sure if I should leave them or remove <code>customer_products_customer_id</code>.</p>