title: Set the command line argument for sql file with \i in postgres
body: <p>I am running the sql script for postgres.</p>
  
  <p>Sql script(books.sql) is:</p>
  
  <pre><code>CREATE TABLE tablename AS TABLE booksback WITH NO DATA;
  
  INSERT INTO tablename (SELECT * from booksback);
  
  TRUNCATE TABLE books CASCADE;
  </code></pre>
  
  <p>I want to set the table name with command line argument.</p>
  
  <p>I am running the script as:</p>
  
  <pre><code>postgres=# \i \books.sql;
  
  </code></pre>
  
  <p>I want to know how to set the pass the table name in sql file using \i option in postgres.</p>
  
  <p>I have tried the -v option and :set as well.</p>