# Connect pgadmin to postgresql

**URL:** <https://forum.getodk.org/t/connect-pgadmin-to-postgresql/40820>\
**Category:** Support\
**Tags:** odk-central\
**Created:** [March 19, 2023, 10:04pm UTC](https://forum.getodk.org/t/connect-pgadmin-to-postgresql/40820 "2023-03-19T22:04:20Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![mathieubossaert](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/mathieubossaert/32/6131_2.png) [@mathieubossaert](https://forum.getodk.org/u/mathieubossaert)\
**Post date:** [March 20, 2023, 4:13pm UTC](https://forum.getodk.org/t/connect-pgadmin-to-postgresql/40820/5 "2023-03-20T16:13:19Z")

</div>

Hi @PedroReina !  
We had the same need in the past and tried various approaches. As @danbjoseph said, querying json from central's database is not easy nor suitable.  
OData API is the solution.  
If your destination database is PostgreSQL, we published two years ago I created a set of function to automatically get data from central in our daily database.

> [@Central2pg : PostgreSQL set of functions to get data from Central](https://forum.getodk.org/t/central2pg-postgresql-set-of-functions-to-get-data-from-central/33350/2):
>
> Some news from this work wink I moved the functions set to github : Feel free to improve it ! I am not a pl-pgsql guru and I am sure it could be cleaner / safer... I would be glad to discuss about that work and on how to improve it with anybody else. The filtering capability on submission\_date has been removed as it only applies to Submissions table, not to its "daughters". So we are in a "all data download" scenario and I hope we will be able to [improve it later](https://forum.getodk.org/t/propagate-submission-date-to-child-tables/34349) to improve bandwidth and …

pyODK offers now the possibility to create pl/python function within your own PostgreSQL database (we will show something soon), or python autonomous routines.

---

_[View the full topic](https://forum.getodk.org/t/connect-pgadmin-to-postgresql/40820)._
