# Active::record and postgres schemas

**URL:** <https://www.ruby-forum.com/t/active-record-and-postgres-schemas/87830>\
**Category:** Rails\
**Created:** [March 6, 2007, 8:54am UTC](https://www.ruby-forum.com/t/active-record-and-postgres-schemas/87830 "2007-03-06T08:54:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![georgeuoa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/7ab992/32.png) [@georgeuoa](https://www.ruby-forum.com/u/georgeuoa)\
**Post date:** [March 6, 2007, 8:54am UTC](https://www.ruby-forum.com/t/active-record-and-postgres-schemas/87830/1 "2007-03-06T08:54:34Z")

</div>

Hi  
It seems that active record only supports views from the public schema  
in postgres? but i feel that there must be a way to overide this.

Somebody with an idea about how to achive this?

i have a database with 3 different schemas. After fine tuning here and  
there rails can read and access the different database views using  
active record but only those from the public schema.

i have set the same privileges for all the three schemas but it seems  
like active record is “only in love” with the public views and tables.

Anyone who knows how to overide this in active record?

or using the database.yml configurations?

thanks  
rgds  
tanzanite

---

<div class="post-metadata">

**Author:** ![georgeuoa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/7ab992/32.png) [@georgeuoa](https://www.ruby-forum.com/u/georgeuoa)\
**Post date:** [March 6, 2007, 10:51am UTC](https://www.ruby-forum.com/t/active-record-and-postgres-schemas/87830/2 "2007-03-06T10:51:18Z")

</div>

On 3/5/07, Tanzanite T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> i have set the same privileges for all the three schemas but it seems  
> like active record is “only in love” with the public views and tables.
> 
> Anyone who knows how to overide this in active record?
> 
> or using the database.yml configurations?

Set schema\_search\_path: public,other,schemas in database.yml

jeremy

---

<div class="post-metadata">

**Author:** ![georgeuoa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/7ab992/32.png) [@georgeuoa](https://www.ruby-forum.com/u/georgeuoa)\
**Post date:** [March 6, 2007, 11:23am UTC](https://www.ruby-forum.com/t/active-record-and-postgres-schemas/87830/3 "2007-03-06T11:23:23Z")

</div>

Hi Jeremy,

Is it possible the issue is related to this possible bug:

[http://dev.rubyonrails.org/ticket/7688](http://dev.rubyonrails.org/ticket/7688)

Mezza
