title: Airflow template not rendering when used with PostgresOperator when trying to pass value from XCom
body: <p>I've written a pretty simple DAG that first does some python operations and afterwards should update a Database-Table with the returned value. Here is the DAG-Code:</p>
  
  <pre><code>tmpl_search_path = Variable.get('sql_path')
  
  dag = DAG('test_dag',
            description='',
            schedule_interval='@daily',
            template_searchpath=tmpl_search_path,
            start_date=datetime(2017, 3, 20),
            catchup=False)
  
  # Returns a string
  t1 = PythonOperator(task_id='t1',
                      python_callable= someCallable,
                      dag=dag)
  
  
  update_monitoring_table_last_run = PostgresOperator(task_id='update_monitoring_table_last_run',
                                                      sql='update_monitoring_table_last_run.sql',
                                                      postgres_conn_id='conn_id',
                                                      params={"script_name": t1.task_id},
                                                      dag=dag)
  
  update_monitoring_table_status_msg = PostgresOperator(task_id='update_monitoring_table_status_msg',
                                                        sql='update_monitoring_table_status_msg.sql',
                                                        postgres_conn_id='conn_id',
                                                        params={"script_name": str(t1.task_id),
                                                                "status_msg": "{{ ti.xcom_pull(key='return_value') }}"},
                                                        dag=dag)
  
  t1 &gt;&gt; update_monitoring_table_last_run &gt;&gt; update_monitoring_table_status_msg
  </code></pre>
  
  <p>The PostgresOperator for <code>update_monitoring_table_last_run</code> works completely fine, so no worries there. How <code>update_monitoring_table_status_msg</code> does not work as intended.
  Here is the underlying SQL-template:</p>
  
  <pre><code>UPDATE table
  SET status_msg = '{{ params.status_msg }}'
  WHERE script_name = '{{ params.script_name }}'
  </code></pre>
  
  <p>The rendered template though looks like this:</p>
  
  <pre><code>UPDATE bi.bi_scripts_monitoring
  SET status_msg = '{{ ti.xcom_pull(key='return_value') }}'
  WHERE script_name = 'script_name'
  </code></pre>
  
  <p>But I want it to look like this:</p>
  
  <pre><code>UPDATE bi.bi_scripts_monitoring
  SET status_msg = 'StringThatWasReturnedByPythonOperator'
  WHERE script_name = 'script_name'
  </code></pre>
  
  <p>Why is it not rendering the value here? I tried the same with a <code>BashOperator</code> and there the template was rendered correctly? 
  Any help would be appreciated. I think I'm missing something XCom specific.</p>