File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,13 @@ def exists?
1414 @url && @url . size > 0
1515 end
1616
17- # host can be "/var/run/postgresql,/run/postgresql,/tmp" on Linux with pg 1.6+
1817 def local?
19- !host || %w( localhost 127.0.0.1 ) . include? ( host ) || host . split ( "," ) . all? { |v | v . start_with? ( "/" ) }
18+ socket? || %w( localhost 127.0.0.1 ) . include? ( host )
19+ end
20+
21+ # host can be "/var/run/postgresql,/run/postgresql,/tmp" on Linux with pg 1.6+
22+ def socket?
23+ !host || host . split ( "," ) . all? { |v | v . start_with? ( "/" ) }
2024 end
2125
2226 def host
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ def search_tree(file)
124124 end
125125
126126 def print_description ( prefix , source )
127- location = " on #{ source . host } :#{ source . port } " if source . host
127+ location = " on #{ source . host } :#{ source . port } " if ! source . socket?
128128 log "#{ prefix } : #{ source . dbname } #{ location } "
129129 end
130130
You can’t perform that action at this time.
0 commit comments