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:

{sql}
select * from system
{sql}

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

681 views 21 12
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