Closed GoogleCodeExporter closed 9 years ago
TEMP TABLE is invisible from a different connection, while RPostgreSQL tries to
open new connection when some results is remaining on current connection. In
the new connection, the temp table would be invisible.
While the example by astukalov does not work, inserting a dbClearResult() call
will make it work without creating another tmptest like:
c <- dbSendQuery(con, "CREATE TEMP TABLE tmptest AS SELECT * FROM foo")
dbClearResult(c)
d <- dbGetQuery(con, "SELECT * FROM tmptest")
I am not sure if the implicit clone connection feature is better removed or
actually required for some purpose.
Original comment by tomoa...@kenroku.kanazawa-u.ac.jp
on 24 Sep 2010 at 12:47
r230, r231 avoid connection cloning and call dbClearResult() instead.
Original comment by tomoa...@kenroku.kanazawa-u.ac.jp
on 30 Mar 2012 at 4:08
Original issue reported on code.google.com by
astuka...@gmail.com
on 28 Oct 2009 at 12:53