-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Passing search_path to postgres
PostPosted: Mon Jul 09, 2007 11:13 am 
Newbie

Joined: Mon Jun 25, 2007 3:59 pm
Posts: 15
I have multi-company PostgreSQL database.

Common files are in public schema.
Company specific files are in separate schema for every company.

nhibernate cannot find company specific tables in this database.
It does not allow to pass

SET SEARCH_PATH TO companyx,public

command to postgres.

How to force nhibernate to pass

SET SEARCH_PATH TO companyx,public

command to Postgres ?


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 13, 2008 9:44 am 
Newbie

Joined: Tue May 01, 2007 8:35 am
Posts: 4
Starting with Npgsql 2.0beta3 (the ADO.NET data provider for PostgreSQL), it's possible to define the search path in the connection string.

According to Npgsql User's Manual ('Working with search paths' section):

Npgsql allows you to modify the search path when connecting to a database. In order to do that, just specify it in your connection string with the syntax:
Code:
searchpath='blablabla,blabla,blabla'

Note that by specifying a search path in connection string, you may want to add the public schema as it will not be added automatically.


see: http://www.npgsql.org/docs/manual/UserManual.html


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.