Re: libpq-how to add a schema to search path

From: Divakar Singh <dpsmails(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Subject: Re: libpq-how to add a schema to search path
Date: 2012-10-10 15:28:44
Message-ID: 1349882924.34899.YahooMailClassic@web160605.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Laurenz,
Thanks for quick reply.
I hope it will help. Will check and revert.

Best Regards,
dpsmails

--- On Wed, 10/10/12, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> wrote:

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Subject: RE: [GENERAL] libpq-how to add a schema to search path
To: "Divakar Singh *EXTERN*" <dpsmails(at)yahoo(dot)com>, pgsql-general(at)postgresql(dot)org
Date: Wednesday, October 10, 2012, 4:01 PM

Divakar Singh wrote:
> While making connection to PGSQL using libpq, is there any option to
mention the schema name?
> Something similar exists in java, however not sure about libpq.

Use the "options" connection parameter, like this:

psql "dbname=test user=laurenz port=5432 options='-c
search_path=schema1,schema2'"

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2012-10-10 15:56:58 Re: pg_upgrade not detecting version properly
Previous Message Seref Arikan 2012-10-10 15:11:56 Re: Re: Suggestions for the best strategy to emulate returning multiple sets of results