Re: pg_conndefaults Returning empty string

From: Anushka Chandrababu <anushka(dot)babu(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_conndefaults Returning empty string
Date: 2015-03-09 16:52:43
Message-ID: CALE7E8eP7i_w4UGDU5NVhFgHRaeEXknzwnnA7ykrP49Ef1PU+w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I am using Postgres as a part of another software and the version is 9.3.

I do not know how then the pg_conndefaults command works.

Please help me with some other solution so that I can get the details of a
particular connection such as host ip address and then use that create a
new connection to a different database.

Thank You
Anushka

On Mon, Mar 9, 2015 at 6:47 PM, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:

> On 03/09/2015 12:57 AM, Anushka Chandrababu wrote:
>
>> Hi,
>>
>> I am accessing postgres database using tcl. I am looking for a way to
>> change the database in an existing connection, but I saw that this is
>> not possible in postgresql without creating a new connection.
>>
>> Then I decided to query pg_conndefaults so that I can get the previous
>> connection detail, mainly the host ip address. But
>> it returned blank strings. Is there a way to set the pg_conndefault
>> values.Then I can use those values to make the new connection. Please
>> understand that at this point in the code, I have no information about
>> the previous connection parameters. I only know the new database name to
>> which it has to be connected.
>>
>> Please let me know if there is a way to tackle this situation.
>>
>
> What version of Postgres are you working with?
>
> The last version I can find that has pg_conndefaults is 7.4.
>
>
>> Thank You
>> Anushka
>>
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2015-03-09 16:55:13 Re: pg_upgrade failing from 9.3 to 9.4 because "template0" already exists
Previous Message John McKown 2015-03-09 16:49:50 Re: Creating composite keys from csv