error on simple querying postgres cfscript

134 views
Skip to first unread message

manaus

unread,
Feb 18, 2013, 5:28:07 PM2/18/13
to ra...@googlegroups.com
Hello, I'm using Railo 4.0.2.002 with PostgreSQL 9.1 JDBC4 (build 903) driver (tried also on build 1002 both JDBC3 and 4) but running this code http://pastebin.com/fvGNAxbx I get Syntax error at or near 'RETURNING'.
Can't really say why.

Thanks for any suggestion

Igal @ getRailo.org

unread,
Feb 18, 2013, 5:29:34 PM2/18/13
to ra...@googlegroups.com
I suggest trying a different driver. maybe an older one. I think that
this is an issue that someone (Peter?) reported in the past.


Igal
> --
> You received this message because you are subscribed to the Google
> Groups "Railo" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to railo+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Igal @ getRailo.org

unread,
Feb 18, 2013, 5:32:33 PM2/18/13
to ra...@googlegroups.com
see also https://issues.jboss.org/browse/RAILO-2019


Igal

On 2/18/2013 2:28 PM, manaus wrote:

Pierre-Olivier Chassay

unread,
Feb 18, 2013, 5:33:07 PM2/18/13
to ra...@googlegroups.com
Yes we have some issue as well with the drivers of 4.0 we copy the driver of the old railo 3.4 and it work for us

On Mon, Feb 18, 2013 at 10:29 PM, Igal @ getRailo.org <ig...@getrailo.org> wrote:
I suggest trying a different driver.  maybe an older one.  I think that this is an issue that someone (Peter?) reported in the past.


Igal


On 2/18/2013 2:28 PM, manaus wrote:
Hello, I'm using Railo 4.0.2.002 with PostgreSQL 9.1 JDBC4 (build 903) driver (tried also on build 1002 both JDBC3 and 4) but running this code http://pastebin.com/fvGNAxbx I get Syntax error at or near 'RETURNING'.
Can't really say why.

Thanks for any suggestion
--
You received this message because you are subscribed to the Google Groups "Railo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to railo+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google Groups "Railo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to railo+unsubscribe@googlegroups.com.

Seb Duggan

unread,
May 3, 2013, 4:29:15 AM5/3/13
to ra...@googlegroups.com
Is there any progress on this issue?

I've added a comment and vote to the ticket linked above.

If it was just my server, then changing the driver would be an option; however, I am currently working on adding PostgreSQL support to Mura CMS, so would like to see a solution that will work with the default, out-of-the-box install of Railo...

- Seb


On Monday, 18 February 2013 22:33:07 UTC, moo...@googlemail.com wrote:
Yes we have some issue as well with the drivers of 4.0 we copy the driver of the old railo 3.4 and it work for us

On Mon, Feb 18, 2013 at 10:29 PM, Igal @ getRailo.org <ig...@getrailo.org> wrote:
I suggest trying a different driver.  maybe an older one.  I think that this is an issue that someone (Peter?) reported in the past.


Igal


On 2/18/2013 2:28 PM, manaus wrote:
Hello, I'm using Railo 4.0.2.002 with PostgreSQL 9.1 JDBC4 (build 903) driver (tried also on build 1002 both JDBC3 and 4) but running this code http://pastebin.com/fvGNAxbx I get Syntax error at or near 'RETURNING'.
Can't really say why.

Thanks for any suggestion
--
You received this message because you are subscribed to the Google Groups "Railo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to railo+un...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "Railo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to railo+un...@googlegroups.com.

Seb Duggan

unread,
May 16, 2013, 11:45:08 AM5/16/13
to ra...@googlegroups.com
Still nothing on this?


What is happening differently when a cfquery is performing via cfscript? That is the only differentiating factor...

Driver 8.3 (605) works OK, but 8.4 and later do not.


- Seb

Jochem van Dieten

unread,
May 16, 2013, 5:00:23 PM5/16/13
to ra...@googlegroups.com
I had a quick look through the PostgreSQL JDBC source and it looks like Statement.RETURN_GENERATED_KEYS is being set on a query that is not an INSERT causing the JDBC driver to append "RETURNING *" to the statement. Looks like the JDBC spec only clearly defines the expected behaviour when that flag is combined with an INSERT statement.

Jochem



--
Did you find this reply useful? Help the Railo community and add it to the Railo Server wiki at https://github.com/getrailo/railo/wiki
 
 
If you don't have time, add a request to the Railo Server wiki to-do page at https://github.com/getrailo/railo/wiki/Todo
---
You received this message because you are subscribed to the Google Groups "Railo" group.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Jochem van Dieten
http://jochem.vandieten.net/

Seb Duggan

unread,
May 16, 2013, 5:19:13 PM5/16/13
to ra...@googlegroups.com
Interesting...

So why is it only an issue when the query is run from within cfscript?


- Seb

16 May 2013 22:00

Seb Duggan

unread,
May 16, 2013, 5:40:44 PM5/16/13
to ra...@googlegroups.com
So the reason it fails in cfscript is that every query via cfscript does a cfquery with the "result" attribute specified.

If you specify the result attribute in any tag-based cfquery, it will also fail...

- Seb

16 May 2013 22:00
I had a quick look through the PostgreSQL JDBC source and it looks like Statement.RETURN_GENERATED_KEYS is being set on a query that is not an INSERT causing the JDBC driver to append "RETURNING *" to the statement. Looks like the JDBC spec only clearly defines the expected behaviour when that flag is combined with an INSERT statement.

Jochem

--
Jochem van Dieten
http://jochem.vandieten.net/
--
Did you find this reply useful? Help the Railo community and add it to the Railo Server wiki at https://github.com/getrailo/railo/wiki
 
 
If you don't have time, add a request to the Railo Server wiki to-do page at https://github.com/getrailo/railo/wiki/Todo
---
You received this message because you are subscribed to a topic in the Google Groups "Railo" group.

For more options, visit https://groups.google.com/groups/opt_out.
 
 
3 May 2013 09:29
Is there any progress on this issue?

I've added a comment and vote to the ticket linked above.

If it was just my server, then changing the driver would be an option; however, I am currently working on adding PostgreSQL support to Mura CMS, so would like to see a solution that will work with the default, out-of-the-box install of Railo...

- Seb


On Monday, 18 February 2013 22:33:07 UTC, moo...@googlemail.com wrote:
--
Did you find this reply useful? Help the Railo community and add it to the Railo Server wiki at https://github.com/getrailo/railo/wiki
 
 
If you don't have time, add a request to the Railo Server wiki to-do page at https://github.com/getrailo/railo/wiki/Todo
---
You received this message because you are subscribed to a topic in the Google Groups "Railo" group.

Jochem van Dieten

unread,
May 18, 2013, 5:18:40 AM5/18/13
to ra...@googlegroups.com
On Thu, May 16, 2013 at 11:40 PM, Seb Duggan wrote:
If you specify the result attribute in any tag-based cfquery, it will also fail...

Except if the query is an insert, because then there actually are keys to return.

Jochem

Reply all
Reply to author
Forward
0 new messages