pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: sivapostgres@yahoo.com <sivapostgres@yahoo.com>
To: Ben Madin <ben@ausvet.com.au>
Cc: Postgresql General Group <pgsql-general@lists.postgresql.org>
Subject: Re: Connecting to Postgresql without IP address
Date: Thu, 1 Jul 2021 06:33:22 +0000 (UTC)
Message-ID: <1441737489.2225140.1625121202857@mail.yahoo.com> (raw)
In-Reply-To: <CA+weYr2utSA0yNSK3Bs7zwhm3GOH1Wi9_fbCSar5GRWegA0hzg@mail.gmail.com>
References: <287756112.2102941.1625039646543.ref@mail.yahoo.com>
	<287756112.2102941.1625039646543@mail.yahoo.com>
	<CA+weYr2utSA0yNSK3Bs7zwhm3GOH1Wi9_fbCSar5GRWegA0hzg@mail.gmail.com>

 Thanks Ben,
It's NOT working.   Already an entry similar to this is there
host all all 192.168.1.0 255.255.255.0 md5
And I added the following entry also in the hba file and restarted PG Serverhostssl all all 192.168.1.0/16 md5
And tried to connect using server computer name instead of IP address.  I get an error, when I try to add and test and ODBC entry


Any thing else I need to do ?
Happiness Always
BKR Sivaprakash



    On Thursday, 1 July, 2021, 06:15:45 am IST, Ben Madin <ben@ausvet.com.au> wrote:  
 
 Your connection string will work as long as there is a DNS entry for PGServer.
Your pg_hba.conf will however need to have an IP address/netmask. So if you are connecting from within your local network, you can put something like:
hostssl     all      all      192.168.0.0/16       md5
Hth?

On Wed, 30 Jun 2021 at 15:54, sivapostgres@yahoo.com <sivapostgres@yahoo.com> wrote:

Hello,
Using PostgreSQL 11
Currently connecting PostgreSQL database from our Powerbuilder application using the IPAddress as Server Name through ODBC driver.  Would like to know whether we can connect naming the computername instead of IP Address ?  If yes, what info to be entered in pg_hba.config file ?
My connection string is :"ConnectString='Driver=PostgreSQL Unicode;Database=dbname;Server=192.168.1.21;Port=5432;UID=user;PWD=pass;',DisableBind=1"

Here Server is assigned with IP Address of the computer where PostgreSQL is installed.  I think of doing it with "ConnectString='Driver=PostgreSQL Unicode;Database=dbname;Server=PGServer;Port=5432;UID=user;PWD=pass;',DisableBind=1"

Is it possible ?   
Happiness AlwaysBKR Sivaprakash

-- 
-- 

Sent from my iPhone.  

view thread (3+ messages)

Message-ID: <1441737489.2225140.1625121202857@mail.yahoo.com>
Permalink:  ../1441737489.2225140.1625121202857@mail.yahoo.com/
Also on:    postgresql.org/message-id/1441737489.2225140.1625121202857@mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: sivapostgres@yahoo.com, ben@ausvet.com.au
  Subject: Re: Connecting to Postgresql without IP address
  In-Reply-To: <1441737489.2225140.1625121202857@mail.yahoo.com>
  References: <287756112.2102941.1625039646543.ref@mail.yahoo.com> <287756112.2102941.1625039646543@mail.yahoo.com> <CA+weYr2utSA0yNSK3Bs7zwhm3GOH1Wi9_fbCSar5GRWegA0hzg@mail.gmail.com> <1441737489.2225140.1625121202857@mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox