Re: [Rd] DBI + ROracle problem with parser ?? (PR#9424)

From: <dhinds_at_sonic.net>
Date: Fri 22 Dec 2006 - 06:36:28 GMT

christian.hoffmann@wsl.ch wrote:

> doesn't:

> dbGetQuery(conn, "\nselect * from dual")

> dbGetQuery(conn, "select\n * from dual")

> dbGetQuery(conn, "/* comment */ select * from dual")

This sounds like my doing. What version of Oracle are you using? Oracle 9i has a bug that interferes with the documented mechanism for asking Oracle for the type of an SQL statement (i.e. whether it is a query returning row data, or a statement that modifies rows). So I asked David James for a quick fix that consisted of checking the beginning of the SQL for either "select" or "with".

We could be more sophisticated about parsing things, I guess skipping over any arbitrary combination of comments and white space. Or, if you're using a version of Oracle not affected by the bug, you can edit src/Makefile and comment out the line:

  WORKAROUND = "-DRS_ORA_SQLGLS_WORKAROUND"


R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri Dec 22 17:38:17 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 22 Dec 2006 - 07:31:03 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.