SQL for Confluence Error

Hello. I am using Confluence version 5.9.3 (on Redhat Linux) and the latest SQL for Confluence on a trial basis. I'm receiving rendering errors using both sql and macro-sql. I saw someplace (which I cannot now find) that there was an issue with how Confluence was rendering. I'm wondering if I'm experiencing that issue.

I am using the SQL right now and this is what I'm receiving:

Error rendering macro 'sql' : org.postgresql.util.PSQLException: ERROR: syntax error at or near "{" Position: 22

This one is using file based SQL located on the server itself. But also when I do the exact some sql statement in the macro, I get the same error. Here is the SQL I'm using taken from the documentation page:

select * from system

I don't think I have to supply anything else since I'm specifying the datasource in the macro itself.

Has anyone else seen this before? I'm thinking(remembering) I may have to upgrade Confluence because of the rendering issue I saw. But I want to be sure.

If anyone can help it would be greatly appreciated.

Glen Collins

1 answer

1 accepted

Did you insert the example as wiki markup using the Insert -> Markup menu item? I suspect not - you probably created a sql macro directly in the editor. In that case, you just put the sql statement in the body of the macro.

So what you are saying is:

-> insert -> macro -> sqlquery macro

And then"

Focus sqlquery macro -> insert -> markup -> add statement -> insert

Well when I select/focus the sqlquery macro, the 'insert more content' goes grey and is unselectable.

Ok. Well I feel stupid now. It was an error in the data source profiles. Once that was fixed it started working.

Thanks for answering this question though.

Glen Collins

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

842 views 41 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you