Skip to content

Commit

Permalink
added a non-default PostreSQL port
Browse files Browse the repository at this point in the history
  • Loading branch information
jvo203 committed Nov 10, 2024
1 parent e4ac5d2 commit b7b82bd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Julia/fits_sync.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ function connect_db(db_name)
password = user * String(UInt8.([33]))
# host = "jvof" # on zodiac
host = "jvox.vo.nao.ac.jp" # on the cluster
port = 5433

url = "postgresql://" * user

Expand All @@ -16,6 +17,11 @@ function connect_db(db_name)
end

url *= "@" * host

if port != 5432
url *= ":" * string(port)
end

url *= "/" * db_name

return LibPQ.Connection(url)
Expand Down

0 comments on commit b7b82bd

Please sign in to comment.