Skip to content
Prev 618 / 1559 Next

RPostgreSQL - dbExistsTable() is FALSE with schema names?

On Mon, Apr 6, 2009 at 7:42 PM, Dirk Eddelbuettel <edd at debian.org> wrote:

            
Looks like dbTableExists() method calls dbListTables() method, and that uses
the SQL query:

select tablename from pg_tables
where schemaname !='information_schema'
and schemaname !='pg_catalog'

This returns the table name, but no schema name.  R code is then used to
check for equality of strings.  This will lead to the incorrect behavior as
noted.  I can provide a patch, probably, but it won't be immediate, so if
someone else gets there first, just let us know.

Sean