Re: Major newbie - Part deux - Mailing list pgsql-novice

From Josh Berkus
Subject Re: Major newbie - Part deux
Date
Msg-id web-811065@davinci.ethosmedia.com
Whole thread Raw
In response to Major newbie - Part deux  ("David J. Lines" <dlines@principia.edu>)
List pgsql-novice
David,

> 1.  Can I have entries in pg_hba.conf for specific databases and then
>  end
> with an entry for all so that I can protect certain databases one way
>  and
> all the rest another way?  For example:

According to the docs, yes.  I haven't tried it, though.

> 2.  What happens if I have an entry for a specific TCP/IP address
>  will it
> take that over the general address?

No.

> 3.  What is the difference in the following two lines?
>
> host     all     192.168.34.0     255.255.255.255    password
> host     all     192.168.34.0     255.255.255.0      password

"One of these things is not like the others ...."

This is basic TCP/IP networking know-how.  The Netmask (255.255.255.0)
 defines the range of addresses covered.
Line 1 covers only the single address 192.168.34.0
Line 2 covers 192.168.34.0 to 192.168.34.255

Got it?

-Josh

P.S. As of 7.2, you may have to re-start the database server to make
 your pg_hba.conf changes take effect.

pgsql-novice by date:

Previous
From: Oliver Elphick
Date:
Subject: Re: COPY from on date field problem
Next
From: denis@coralindia.com
Date:
Subject: Re: update