Re: Postgres on shared network drive - Mailing list pgsql-general

From Craig Ringer
Subject Re: Postgres on shared network drive
Date
Msg-id 47FF378F.4080601@postnewspapers.com.au
Whole thread Raw
In response to Postgres on shared network drive  (J Ottery <jottery@becsystems.com.au>)
List pgsql-general
J Ottery wrote:
> Thanks so much Craig. I have decided to migrate to Postgres and most
> of my applications are single computer based but I need to plan for
> future needs. Some research is in order for me.

All you should need to do is allow the user / administrator to configure
the connection settings for the application. An initial single user
deployment can be done by installing the PostgreSQL server on the same
computer as the program(s) that use it and having the application
default to connecting to a database on "localhost". If you need to go
multi-user, you can either move the postgresql server to a separate
server computer and update the application settings to have them all
connect to the server computer, or you can just have the additional
users connect to the postgresql server on the first person's computer.
In either case no changes to the application code should be required;
you should only need to change the server hostname setting.

Your application doesn't necessarily have to care where the database
server is. If you use something like ODBC then your data source
definition specifies where the DB server is, and the app just asks to
open the data source. The app won't even be able to tell if the DB
server is on the same computer or not.

If you explicitly connect to the DB in your program code then all you
need to do is provide a way to change the database connection settings
in the application GUI or in a configuration file, so the user can enter
the database server hostname, server port, database username, and
database password.

--
Craig Ringer



pgsql-general by date:

Previous
From: J Ottery
Date:
Subject: PostgresSQL on a networked drive with multiple users
Next
From: Craig Ringer
Date:
Subject: Re: PostgresSQL on a networked drive with multiple users