SQL data does not show on confluence page
Asked by aysegul erciyas:

Hello,

I want to use confluence on synology NAS. The pages that needs to be shown on confluence come from a postgress sql database.

I have de confluence page up and running using docker in synology NAS. The postgres container is also up and running. But the data from the database does not show as pages.

How can I fix this?

Regards


Answers:
author: Mike Rathwell
body: Hi [@aysegul erciyas](/t5/user/viewprofilepage/user-id/4238340)

Confluence won't directly display the results from a SQL query out of the box. However, there are a[variety of apps you can add that will do this for you](https://marketplace.atlassian.com/search?product=confluence&query=sql). I have used both the Bob Swift ones and Pocket Query; they both work great. The nice thing is that you can drop the results of the SQL query into various table formatting macros to improve visuals and/or function of it.

Hope this helps.

comments: author: aysegul erciyas
body: Hi [@Mike Rathwell](/t5/user/viewprofilepage/user-id/853367)

I've tried Bob Swift but the add-on does not find my database.

Now I'm trying with Pocket Query but how can I connect to the postgres database on the Synology NAS?


author: Sven Schatter _Lively Apps_
body: Hi [@aysegul erciyas](/t5/user/viewprofilepage/user-id/4238340),

I'm one of the developers of the [PocketQuery for Confluence](https://marketplace.atlassian.com/apps/1211199/) app that was mentioned by [@Mike Rathwell](/t5/user/viewprofilepage/user-id/853367). If you have any questions about it, don't hesitate to ask here or shoot us an email to [support@livelyapps.com](mailto:support@livelyapps.com)! :)

Cheers,  
Sven

comments: author: aysegul erciyas
body: Hi [@Sven Schatter _Lively Apps_](/t5/user/viewprofilepage/user-id/1169931) ,

As I said to [@Mike Rathwell](/t5/user/viewprofilepage/user-id/853367) I have installed the add-on but I can not find how to connect to my postgress database on Synology NAS.


author: aysegul erciyas
body: [@Sven Schatter _Lively Apps_](/t5/user/viewprofilepage/user-id/1169931) ,

I've succesfully connected my database, but now when I want to execute a query its gives me the error 'Unexpected error communicating with the server.'

How can I fix this?


author: Sven Schatter _Lively Apps_
body: Hi [@aysegul erciyas](/t5/user/viewprofilepage/user-id/4238340),

I'm pretty sure the error you're seeing (*"Unexpected error communicating with the server."*) is popping up in a flag when you do a live Query Preview inside the PocketQuery admin, correct? If yes, that's a bug that we are currently working on fixing as we speak.

This is really just a wrong error message, what this really means is that something in your SQL statement is likely wrong (e.g. incorrect syntax). You should be able to see more information about the actual error if you insert the PocketQuery macro into a page and execute your Query there. But you can also just share your SQL statement here or [raise a support ticket with us](https://go.livelyapps.com/support) if you don't feel like sharing it publicly.

Hope this helps!

Cheers,  
Sven


author: aysegul erciyas
body: hi [@Sven Schatter _Lively Apps_](/t5/user/viewprofilepage/user-id/1169931) ,

There was indeed a syntax error, thank you :)


author: Sven Schatter _Lively Apps_
body: Awesome! Sounds like you're all set up? Great to hear that! :)

Cheers,  
Sven


author: aysegul erciyas
body: Yes it's all set up. Now I have to create a space and pages using sql :/


Tags: confluence-server

postgres

server

sql