Re: Location of databases

From: Michael Wood <esiotrot(at)gmail(dot)com>
To: john shipley <johnwshipley(at)hotmail(dot)co(dot)uk>
Cc: pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Location of databases
Date: 2009-07-28 09:48:45
Message-ID: 5a8aa6680907280248p693ba1b3pae565973e2642d5d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

2009/7/28 Andreas Wenk <a(dot)wenk(at)netzmeister-st-pauli(dot)de>:
> john shipley schrieb:
[...]
>> In order to load the contents of a PostgreSQL file into PSPP,
>> I have to show its location and name and indicate that is is a PostgreSQL
>> file by means of a statement like the following:
>>
>> FILE = /home/myusername/.../.../.../ filenamedb(PSQL).

I don't know anything about PSPP, but you cannot directly access the
files used by PostgreSQL. You have to use a client like psql or
ODBC/JDBC or the PostgreSQL client libraries to talk to PostgreSQL and
PostgreSQL reads/writes the files itself. This is why the location of
the files is generally not something you need to know. What you do
need to know is things like the IP address of the machine running
PostgreSQL and the port number that PostgreSQL is running on (unless
you're on the same machine and you're using a Unix domain socket to
talk to PostgreSQL.)

The above is the same for MySQL, Oracle, MS SQL Server, IBM DB2 etc.
As far as I know it is only embedded databases like Sqlite and MS
Access where you need to know the location of the file in order to
access the database.

>> Similarly, if I wish to connect to a PostgreSQL file via the Open Office
>> RDBMS, in order to use that medium to construct a query visually, I have to
>> point to the location of the file using a file manager.

No, you need to use the "Connect to an existing database" option and
choose "JDBC". You will then need to specify the JDBC datasource URL.
I can't help you there off the top of my head, but the syntax should
be in the documentation for the PostgreSQL JDBC driver I suppose.

I hope that clarifies things a bit :)

--
Michael Wood <esiotrot(at)gmail(dot)com>

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Andreas Wenk 2009-07-28 09:50:58 Re: Understanding the output of EXPLAIN ANALYSE
Previous Message Andreas Wenk 2009-07-28 09:25:25 Re: Location of databases