Thread: loading a psql input file on win xp

loading a psql input file on win xp

From
"akshay bhat"
Date:
HELLO
i have psql file which is to be used for loading a database

it was downloaded from this link http://conceptnet.media.mit.edu/
the description says
The ConceptNet 3 database, as a PostgreSQL input file. You will need to be running a PostgreSQL server to install ConceptNet 3.
i was earlier
suggested to use following command
to add it to database

psql -d <your_database_name> -f conceptnet-2007-09-25.psql

however i do not know where to execute this command
i am using a windows xp with with postgresql installed in

D:\Program Files\PostgreSQL\8.3\


the file is located in folder

D:\conc\

now can someone please tell me where to execute above command
should i use dos (i mean command prompt )

please help sorry for my foolish question

--
akshay uday bhat.
t.y.c.e.
department of chemical engineering
university institute of chemical technology
mumbai India

On action alone be thy interest,
Never on its fruits.
Let not the fruits of action be thy motive,
Nor be thy attachment to inaction.

Ask and it shall be given to you; seek and you shall find; knock and it shall be opened to you

Re: loading a psql input file on win xp

From
Raymond O'Donnell
Date:
On 08/03/2008 19:46, akshay bhat wrote:

> now can someone please tell me where to execute above command
> should i use dos (i mean command prompt )

Yes, that's it - run it at the command prompt.

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------

Re: loading a psql input file on win xp

From
Colin Wetherbee
Date:
akshay bhat wrote:
> The ConceptNet 3 database, as a PostgreSQL input file. You will need to
> be running a PostgreSQL server to install ConceptNet 3.
> i was earlier
> suggested to use following command
> to add it to database
>
> psql -d <your_database_name> -f conceptnet-2007-09-25.psql
>
> however i do not know where to execute this command

Run the command anywhere you want.  Just make sure the bit after "-f"
points to the proper location of the .psql file.

Also, be sure you have created your own database before running that
command.  Information on creating databases may be found in the
PostgreSQL documentation.

Colin

Re: loading a psql input file on win xp

From
Reid Thompson
Date:
akshay bhat wrote:
> HELLO
> i have psql file which is to be used for loading a database
>
> it was downloaded from this link http://conceptnet.media.mit.edu/
> the description says
> The ConceptNet 3 database, as a PostgreSQL input file. You will need to
> be running a PostgreSQL server to install ConceptNet 3.
> i was earlier
> suggested to use following command
> to add it to database
>
> psql -d <your_database_name> -f conceptnet-2007-09-25.psql
>
> however i do not know where to execute this command
> i am using a windows xp with with postgresql installed in
>
> D:\Program Files\PostgreSQL\8.3\
>
>
> the file is located in folder
>
> D:\conc\
>
> now can someone please tell me where to execute above command
> should i use dos (i mean command prompt )
>
> please help sorry for my foolish question
>
> --
> akshay uday bhat.
> t.y.c.e.
> department of chemical engineering
> university institute of chemical technology
> mumbai India
>
> On action alone be thy interest,
> Never on its fruits.
> Let not the fruits of action be thy motive,
> Nor be thy attachment to inaction.
>
> Ask and it shall be given to you; seek and you shall find; knock and it
> shall be opened to you

you'll also probably have to add the parameter -h 127.0.0.1

Re: loading a psql input file on win xp

From
Raymond O'Donnell
Date:
On 09/03/2008 15:34, Reid Thompson wrote:

> you'll also probably have to add the parameter -h 127.0.0.1

psql defaults to connecting to the local machine unless you tell it
otherwise, so this is redundant; though it certainly won't do any harm
either.

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------

Re: loading a psql input file on win xp

From
Reid Thompson
Date:
On Sun, 2008-03-09 at 19:41 +0000, Raymond O'Donnell wrote:
> On 09/03/2008 15:34, Reid Thompson wrote:
>
> > you'll also probably have to add the parameter -h 127.0.0.1
>
> psql defaults to connecting to the local machine unless you tell it
> otherwise, so this is redundant; though it certainly won't do any harm
> either.
>
Not redundent.  Unless something has changed, psql's default connection
method is via unix socket 5432 and this socket does not exist on
windows. The -h is required to have psql connect to the network socket
which is available on windows.


Re: loading a psql input file on win xp

From
Raymond O'Donnell
Date:
On 09/03/2008 22:33, Reid Thompson wrote:
> On Sun, 2008-03-09 at 19:41 +0000, Raymond O'Donnell wrote:
>> On 09/03/2008 15:34, Reid Thompson wrote:
>>
>>> you'll also probably have to add the parameter -h 127.0.0.1
>> psql defaults to connecting to the local machine unless you tell it
>> otherwise, so this is redundant; though it certainly won't do any harm
>> either.
>>
> Not redundent.  Unless something has changed, psql's default connection
> method is via unix socket 5432 and this socket does not exist on
> windows. The -h is required to have psql connect to the network socket
> which is available on windows.

Oh? Well, on my XP laptop, the following -

    psql -U postgres

- connects without problems to the "postgres" database. Of course, there
*is* the following line in pg_hba.conf -

   host    all         all        127.0.0.1/32          md5

- which was there from installation time.

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------

Re: loading a psql input file on win xp

From
Magnus Hagander
Date:
On Mon, Mar 10, 2008 at 06:55:48AM +0000, Raymond O'Donnell wrote:
> On 09/03/2008 22:33, Reid Thompson wrote:
> >On Sun, 2008-03-09 at 19:41 +0000, Raymond O'Donnell wrote:
> >>On 09/03/2008 15:34, Reid Thompson wrote:
> >>
> >>>you'll also probably have to add the parameter -h 127.0.0.1
> >>psql defaults to connecting to the local machine unless you tell it
> >>otherwise, so this is redundant; though it certainly won't do any harm
> >>either.
> >>
> >Not redundent.  Unless something has changed, psql's default connection
> >method is via unix socket 5432 and this socket does not exist on
> >windows. The -h is required to have psql connect to the network socket
> >which is available on windows.
>
> Oh? Well, on my XP laptop, the following -
>
>    psql -U postgres
>
> - connects without problems to the "postgres" database. Of course, there
> *is* the following line in pg_hba.conf -

Yes, on platforms that don't support Unix sockets (such as Win32), it will
default to localhost.


>   host    all         all        127.0.0.1/32          md5
>
> - which was there from installation time.

Yes, it's set by the win32 installer by default.

//Magnus

Re: loading a psql input file on win xp

From
Reid Thompson
Date:
On Mon, 2008-03-10 at 06:55 +0000, Raymond O'Donnell wrote:
> On 09/03/2008 22:33, Reid Thompson wrote:
> > On Sun, 2008-03-09 at 19:41 +0000, Raymond O'Donnell wrote:
> >> On 09/03/2008 15:34, Reid Thompson wrote:
> >>
> >>> you'll also probably have to add the parameter -h 127.0.0.1
> >> psql defaults to connecting to the local machine unless you tell it
> >> otherwise, so this is redundant; though it certainly won't do any harm
> >> either.
> >>
> > Not redundent.  Unless something has changed, psql's default connection
> > method is via unix socket 5432 and this socket does not exist on
> > windows. The -h is required to have psql connect to the network socket
> > which is available on windows.
>
> Oh? Well, on my XP laptop, the following -
>
>     psql -U postgres
>
> - connects without problems to the "postgres" database. Of course, there
> *is* the following line in pg_hba.conf -
>
>    host    all         all        127.0.0.1/32          md5
>
> - which was there from installation time.
>
> Ray.
>
> ---------------------------------------------------------------
> Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
> rod@iol.ie
> ---------------------------------------------------------------
Cool.  I'll have to check the pg_hba.conf on my windows system and see
what it has in it.  My windows box is running either 8.0.x or 8.1.x.
Has this setting always been this way for the windows installer?

Re: loading a psql input file on win xp

From
Raymond O'Donnell
Date:
On 10/03/2008 11:38, Reid Thompson wrote:

> Cool.  I'll have to check the pg_hba.conf on my windows system and see
> what it has in it.  My windows box is running either 8.0.x or 8.1.x.
> Has this setting always been this way for the windows installer?

As far as I can remember, it has - and I think it's been that way for
source-code installations too, in recent versions at least, though I'm
open to correction on this.

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------