title: Column <tablename>_id referenced in foreign key not found
body: <p>I'm going through 7 Databases in 7 Weeks.</p>
  
  <p>In PostgreSQL, I created a venues table that has a SERIAL venue_id column.</p>
  
  <p>output of <code>\d venues</code></p>
  
  <pre class="lang-none prettyprint-override"><code>                                        Table "public.venues"
       Column     |          Type          |                         Modifiers
  ----------------+------------------------+-----------------------------------------------------------
   venue_id       | integer                | not null default nextval('venues_venue_id_seq'::regclass)
   name           | character varying(255) |
   street_address | text                   |
   type           | character(7)           | default 'public'::bpchar
   postal_code    | character varying(9)   |
   country_code   | character(2)           |
  Indexes:
      "venues_pkey" PRIMARY KEY, btree (venue_id)
  Check constraints:
      "venues_type_check" CHECK (type = ANY (ARRAY['public'::bpchar, 'private'::bpchar]))
  Foreign-key constraints:
      "venues_country_code_fkey" FOREIGN KEY (country_code, postal_code) REFERENCES cities(country_code, postal_code) MATCH FULL
  </code></pre>
  
  <p>The next step is to create an event table that references venue_id with a foreign key.</p>
  
  <p>I'm trying this:</p>
  
  <pre><code>CREATE TABLE events (
  event_id SERIAL PRIMARY KEY,
  title text,
  starts timestamp,
  ends timestamp,
  FOREIGN KEY (venue_id) REFERENCES venues (venue_id));
  </code></pre>
  
  <p>And I get this error:</p>
  
  <pre><code>ERROR: column "venue_id" referenced in forgein key not found
  </code></pre>
  
  <p>What's wrong?</p>