# Postgre Database connection

**URL:** <https://forum.inductiveautomation.com/t/postgre-database-connection/8642>\
**Category:** Ignition\
**Created:** [June 30, 2014, 4:55pm UTC](https://forum.inductiveautomation.com/t/postgre-database-connection/8642 "2014-06-30T16:55:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![controlsim](https://avatars.discourse-cdn.com/v4/letter/c/47e85d/32.png) [@controlsim](https://forum.inductiveautomation.com/u/controlsim)\
**Post date:** [June 30, 2014, 4:55pm UTC](https://forum.inductiveautomation.com/t/postgre-database-connection/8642/1 "2014-06-30T16:55:19Z")

</div>

Hi, I trying to connect to a postgre database, the connection string is this

jdbc:postgresql://localhost:5432/postgredb

By default the data is stored in the public squema, but I want to store the data in a different esquema, how can I do this?

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [June 30, 2014, 8:37pm UTC](https://forum.inductiveautomation.com/t/postgre-database-connection/8642/2 "2014-06-30T20:37:13Z")

</div>

A Google search suggests that `jdbc:postgresql://localhost:5432/postgredb?searchpath=myschema` might work. Can you try it and let me know?

---

<div class="post-metadata">

**Author:** ![controlsim](https://avatars.discourse-cdn.com/v4/letter/c/47e85d/32.png) [@controlsim](https://forum.inductiveautomation.com/u/controlsim)\
**Post date:** [June 30, 2014, 9:48pm UTC](https://forum.inductiveautomation.com/t/postgre-database-connection/8642/3 "2014-06-30T21:48:18Z")

</div>

still does not work, the data is stored in the public schema, thanks anyway.

---

<div class="post-metadata">

**Author:** ![harigobu.gb](https://avatars.discourse-cdn.com/v4/letter/h/b77776/32.png) [@harigobu.gb](https://forum.inductiveautomation.com/u/harigobu.gb)\
**Post date:** [December 15, 2020, 12:06pm UTC](https://forum.inductiveautomation.com/t/postgre-database-connection/8642/4 "2020-12-15T12:06:35Z")

</div>

Hi ,

Ignition database connection for postgresql can connect to database but **how to point the DB connection to particular schema in that database**. I have tried by changing the connection URL to` jdbc:postgresql://localhost:5432/postgredb?searchpath=myschema` It didn’t worked for me.  
I wanted to configure auditing profile for gateway and the auditing profile pointing to Ignition database connection so the AUDIT\_EVENT table will be automatically created in the schema as per my requirement.

Thanks  
Hari Gb

---

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [December 15, 2020, 6:33pm UTC](https://forum.inductiveautomation.com/t/postgre-database-connection/8642/5 "2020-12-15T18:33:31Z")

</div>

Maybe this: [postgresql schema](https://stackoverflow.com/questions/39460459/search-path-doesnt-work-as-expected-with-currentschema-in-url) …?

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [December 15, 2020, 7:08pm UTC](https://forum.inductiveautomation.com/t/postgre-database-connection/8642/6 "2020-12-15T19:08:53Z")

</div>

According to the [documentation](https://jdbc.postgresql.org/documentation/head/connect.html), it should be _currentSchema_

`jdbc:postgresql://localhost:5432/postgredb?currentSchema=myschema`
