title: Sql Insert with dynamic values
body: <p>I am using following query on postgres database:</p>
  
  <pre><code>insert into user_settings (google_access_token, google_refresh_token) 
     select 'google_access_token', 'google_refresh_token' from user 
     where id = user_id
  </code></pre>
  
  <p>table user_settings has a field <code>user_id</code> which corresponds to field named <code>id</code> in user table. but this gives the error:</p>
  
  <pre><code>column "user_id" does not exist 
  Hint: There is a column named "user_id" in table "user_settings", 
  but it cannot be referenced from this part of the query
  </code></pre>