From dhinds at sonic.net  Fri Dec 22 07:36:28 2006
From: dhinds at sonic.net (dhinds at sonic.net)
Date: Fri, 22 Dec 2006 06:36:28 +0000 (UTC)
Subject: [Rd] DBI + ROracle problem with parser ?? (PR#9424)
References: <20061220134024.36DDD57334@slim.kubism.ku.dk>
Message-ID: <emfudc$kra$1@sea.gmane.org>

christian.hoffmann at 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"

-- Dave



[Rd] DBI + ROracle problem with parser ?? (PR#9424)
dhinds at sonic.net