title: Problem arises in create index when creating table in Postgres using R?
body: <p>I'm trying to write a query to create table in Postgres using R.
  And I got a problem when trying to add an index. This is a small example:</p>
  <pre><code>RPostgres::dbSendQuery(con, &quot; create table schema.table (regn int not null, dt date not null, var1 bigint, var2 bigint,
                            constraint aaaa primary key (regn, dt),
                            constraint bbb foreign key (regn) REFERENCES  schema.table2(regn) ON DELETE CASCADE ON UPDATE CASCADE);
                            create index ccc on schema.table(regn)&quot;)
  </code></pre>
  <p>If I run this code without the last row evething is ok.
  But when I run the entire code the following error arises:</p>
  <pre><code>Ошибка в result_create(conn@ptr, statement) :
   Failed to prepare query:
  </code></pre>
  <p>What's wrong with my code?</p>