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

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Divakar Singh *EXTERN*" <dpsmails(at)yahoo(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: libpq-how to add a schema to search path
Date: 2012-10-10 10:31:27
Message-ID: D960CB61B694CF459DCFB4B0128514C20886AD46@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Noah Misch 2012-10-10 11:05:55 Re: BUG #6510: A simple prompt is displayed using wrong charset
Previous Message tigran2-postgres 2012-10-10 10:16:53 Storing large files in multiple schemas: BLOB or BYTEA