# Postgres - connecting to a specific schema

**URL:** <https://community.dreamfactory.com/t/postgres-connecting-to-a-specific-schema/94>\
**Category:** Connecting to SQL\
**Created:** [June 12, 2014, 2:16am UTC](https://community.dreamfactory.com/t/postgres-connecting-to-a-specific-schema/94 "2014-06-12T02:16:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![todd](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@todd](https://community.dreamfactory.com/u/todd)\
**Post date:** [June 12, 2014, 2:16am UTC](https://community.dreamfactory.com/t/postgres-connecting-to-a-specific-schema/94/1 "2014-06-12T02:16:56Z")

</div>

I’m able to create an sql service to my postgres database using:

pgsql:host=pg1;port=5432;dbname=series1

And query the tables in the default schema. However I need to access a particular schema.

I’ve tried:  
pgsql:host=pg1;port=5432;dbname=series1;schema=roadlayers  
pgsql:host=pg1;port=5432;dbname=series1.roadlayers;

Neither work.

I’ve also tried prepending the schema name to the table name on rest queries using roadlayers.testdata as the table name.

What am I missing?

---

<div class="post-metadata">

**Author:** ![Mark](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/mark/32/69_2.png) [@Mark](https://community.dreamfactory.com/u/Mark)\
**Post date:** [June 12, 2014, 6:39pm UTC](https://community.dreamfactory.com/t/postgres-connecting-to-a-specific-schema/94/2 "2014-06-12T18:39:40Z")

</div>

Just giving you a quick follow-up. Working on this for you right now. Thanks,  
Mark

---

<div class="post-metadata">

**Author:** ![Mark](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/mark/32/69_2.png) [@Mark](https://community.dreamfactory.com/u/Mark)\
**Post date:** [June 13, 2014, 3:36pm UTC](https://community.dreamfactory.com/t/postgres-connecting-to-a-specific-schema/94/3 "2014-06-13T15:36:41Z")

</div>

Quickly, are you able to simply make the particular schema you want to use for that table the default schema through postgres?

Then proceed to connect to that particular DBname/table and the default schema will be updated when connected.

Thanks,  
Mark

---

<div class="post-metadata">

**Author:** ![todd](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@todd](https://community.dreamfactory.com/u/todd)\
**Post date:** [June 13, 2014, 4:35pm UTC](https://community.dreamfactory.com/t/postgres-connecting-to-a-specific-schema/94/4 "2014-06-13T16:35:10Z")

</div>

I’m not sure I understand. Are you saying I need to move all the tables that I want to use with Dreamfactory into the “public” schema?

If Dreamfactory supported views I suppose this would be workable as I could just create a view in the public schema. But cramming multiple schemas into public isn’t going to work for us.

---

<div class="post-metadata">

**Author:** ![Mark](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/mark/32/69_2.png) [@Mark](https://community.dreamfactory.com/u/Mark)\
**Post date:** [June 16, 2014, 5:58pm UTC](https://community.dreamfactory.com/t/postgres-connecting-to-a-specific-schema/94/5 "2014-06-16T17:58:19Z")

</div>

Sorry for the delay in response. We have a new release coming out in the next couple of days that will address this issue and you’ll be able to connect to a specific schema. It is all still being tested, but I wanted to at least give you an update as to what to expect in the new release.

Thanks,  
Mark
