Fixed
Details
Assignee
Michael OffnerMichael OffnerReporter
Alex SkinnerAlex SkinnerPriority
NewLabels
Fix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Details
Details
Assignee
Michael Offner
Michael OffnerReporter
Alex Skinner
Alex SkinnerPriority
Labels
Fix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Created 23 February 2016 at 11:10
Updated 12 May 2021 at 14:01
Resolved 2 March 2016 at 21:40
Given the following test case Select statements sometimes failing with RETURNING is invalid syntax.
This is because on select statements with Postgres I assume the driver is incorrectly appending RETURNING * on the end of select statements which is invalid and it should only be for insert and update
it bizarrely does seem to vary on how you call the query for this to be a problem
<!--- empty on purpose ---> <cfset dsn = "preside"> <cfquery datasource="#dsn#" name="qtest1"> select 1 as Foobar </cfquery> <cfdump var="#qtest1#"> <cfquery datasource="#dsn#" name="qtest2"> select 2 as Foobar where 1 = <cfqueryparam cfsqltype="cf_sql_integer" value="1"> </cfquery> <cfdump var="#qtest2#"> <cfquery datasource="#dsn#" name="qtest3" result="myresult"> select 3 as Foobar where 1 = <cfqueryparam cfsqltype="cf_sql_integer" value="1"> </cfquery> <cfscript> QTest4 = queryExecute("SELECT 3 as Foobar", {}, {datasource=dsn}); dump (qTest4); q=new query(); q.setDatasource( dsn); q.setSQL( "select 1 as foobar"); qTest4=q.Execute(); </cfscript>