title: Join tables on columns of composite foreign / primary key in a query
body: <pre><code>CREATE TABLE subscription (
     magazine_id bigint,
     user_id     bigint,
     PRIMARY KEY (magazine_id, user_id)
  );
  
  CREATE TABLE delivery (
     magazine_id bigint,
     user_id     bigint,
     FOREIGN KEY (subscription) REFERENCES subscription (magazine_id, user_id)
  );
  </code></pre>
  
  <p>What is a good way to query for deliveries given a particular subscription? Is there a way to assign a column name to <code>PRIMARY KEY (magazine_id, user_id)</code> and the corresponding foreign key so that I can query like this:</p>
  
  <pre><code>SELECT *
  FROM subscription
  JOIN delivery ON (delivery.subscription_fk = delivery.subscription_pk);
  </code></pre>
  
  <p>Note: I can write something like this:</p>
  
  <pre><code>SELECT *
  FROM subscription
  JOIN delivery ON (delivery.magazine_id = subscription.magazine_id
                AND delivery.user_id = subscription.user_id);
  </code></pre>
  
  <p>However, I am under the impression that there is a less verbose way to achieve this.</p>