RPostgreSQL - dbWriteTable
On Tue, Mar 1, 2011 at 6:40 AM, Chris Long <galizur at gmail.com> wrote:
What's the best way to coax RPostgreSQL into writing a table to a
schema other than "public"? I've tried dbWriteTable("schema.foo",data),
setting search_path to "schema" etc. Nothing's worked; it's either
create "foo" in public, or the table "schema.foo" in public (!).
It will also refuse to write the table if it exists in any schema (!).
Hi, Chris. I think one needs to set the search_path prior to running the dbWriteTable command. See the Postgresql docs: http://www.postgresql.org/docs/current/static/ddl-schemas.html You'll want to do something like: set search_path to 'barschema' Then everything you do will go into barschema rather than public. Sean