Thread: Where is the command line?

Where is the command line?

From
Date:
I'm trying to learn postgreSQL.  I installed 9.3.1. on a PC running Windows 8.  I needed that version to work with some DHI software.  It installed successfully.  I now have a number of postgreSQL associated items in my list of apps.  They are: 
Application Stack Builder
installation notes
pgadmin documentation
pgadmin III
postgreSQL documentation
postgreSQL release notes
Reload Configuration
SQL Shell (psql)

That's The problem is that it doesn’t tell me where to iuse that command.  I have no program called “postgreSQL on my computer despite successfully installing the software. The only program that has a command prompt is the SQL shell one, and that doesn’t seem to be right, because none of the things the tutorials say comes next actually happens.

I used the pgadmin III to create a new database and new user in order to log into the DHI software.  That's as far as I know what to do with the DHI software.  I'm trying to learn what else to do with the postgreSQL, so I've looked up a bunch of tutorials.  They all start out 

To create a new database, in this example named mydb, use the following command:
$ createdb mydb

That's The problem is that it doesn’t tell me where to use that command.  I have no program called “postgreSQL” on my computer despite successfully installing the software. The only program that has a command prompt is the SQL shell one, and that doesn’t seem to be right, because none of the things the tutorials say comes next actually happens.

I looked all over pgadmin and could not find a command line, though it does have menu items for creating a new database.  This leads me to suspect that perhaps I have a different sort of interface.  However, I can’t progress in the tutorials because I can’t find a command line anywhere, and I can’t find any tutorials that tell me how to use interface I have, if that’s what the situation is.  Any advice?

Michael

Re: Where is the command line?

From
Gavin Flower
Date:
On 31/03/16 11:05, madler@sfec.us wrote:
> I'm trying to learn postgreSQL.  I installed 9.3.1. on a PC running
> Windows 8.  I needed that version to work with some DHI software.  It
> installed successfully.  I now have a number of postgreSQL associated
> items in my list of apps.  They are:
> Application Stack Builder
> installation notes
> pgadmin documentation
> pgadmin III
> postgreSQL documentation
> postgreSQL release notes
> Reload Configuration
> SQL Shell (psql)
>
> That's The problem is that it doesn’t tell me where to iuse that
> command.  I have no program called “postgreSQL on my computer despite
> successfully installing the software. The only program that has a
> command prompt is the SQL shell one, and that doesn’t seem to be
> right, because none of the things the tutorials say comes next
> actually happens.
>
> I used the pgadmin III to create a new database and new user in order
> to log into the DHI software.  That's as far as I know what to do with
> the DHI software.  I'm trying to learn what else to do with the
> postgreSQL, so I've looked up a bunch of tutorials.  They all start out
>
> To create a new database, in this example named mydb, use the
> following command:
> $ createdb mydb
>
> That's The problem is that it doesn’t tell me where to use that
> command.  I have no program called “postgreSQL” on my computer despite
> successfully installing the software. The only program that has a
> command prompt is the SQL shell one, and that doesn’t seem to be
> right, because none of the things the tutorials say comes next
> actually happens.
>
> I looked all over pgadmin and could not find a command line, though it
> does have menu items for creating a new database.  This leads me to
> suspect that perhaps I have a different sort of interface.  However, I
> can’t progress in the tutorials because I can’t find a command line
> anywhere, and I can’t find any tutorials that tell me how to use
> interface I have, if that’s what the situation is.  Any advice?
>
> Michael
Hi Michael,

I must admit that I tend to avoid using Microsoft O/S's like the plague,
as they are difficult to use and insecure - so I use a Linux
distribution (Fedora in my case, but there are hundreds to chose from).

You will need to find how to get up a terminal, may be called a DOS
prompt, or something else.  Essentially something that allows you to use
the command line.  We don't have any Microsoft boxen in the house, so I
can't go look.

Once you have PostgreSQL setup to run, I tend to use psql from the
command line coupled with a text editor to create SQL scripts. However,
you can use pgadmin3 - though I personally find psql much easier to use.

Note that the latest version of PostgreSQL is actually 9.5.1, with 9.5.2
due to be released next week!


Cheers,
Gavin




Re: Where is the command line?

From
"David G. Johnston"
Date:
Hi Michael,

On Wed, Mar 30, 2016 at 3:48 PM, Gavin Flower <GavinFlower@archidevsys.co.nz> wrote:
On 31/03/16 11:05, madler@sfec.us wrote:
I'm trying to learn postgreSQL.  I installed 9.3.1. on a PC running Windows 8.  I needed that version to work with some DHI software.  It installed successfully.  I now have a number of postgreSQL associated items in my list of apps.  They are:
Application Stack Builder
installation notes
pgadmin documentation
pgadmin III
postgreSQL documentation
postgreSQL release notes
Reload Configuration
SQL Shell (psql)

That's The problem is that it doesn’t tell me where to iuse that command.  I have no program called “postgreSQL on my computer despite successfully installing the software. The only program that has a command prompt is the SQL shell one, and that doesn’t seem to be right, because none of the things the tutorials say comes next actually happens.

​What tutorial?​  And, have you read the introductory material in our manual?
 

I used the pgadmin III to create a new database and new user in order to log into the DHI software.  That's as far as I know what to do with the DHI software. 
​​
I'm trying to learn what else to do with the postgreSQL, so I've looked up a bunch of tutorials.  They all start out

​You assume that people here know what this "DHI" software is.  I personally have no clue.  And typically, with a database, its the software the "log[s] into" the database and not the other way around.​
 

To create a new database, in this example named mydb, use the following command:
$ createdb mydb

That's The problem is that it doesn’t tell me where to use that command.  I have no program called “postgreSQL” on my computer despite successfully installing the software. The only program that has a command prompt is the SQL shell one, and that doesn’t seem to be right, because none of the things the tutorials say comes next actually happens.


So find a tutorial about using the command line in Windows.  There isn't anything particular special about using the command line programs provided by PostgreSQL.
 
I looked all over pgadmin and could not find a command line, though it does have menu items for creating a new database.  This leads me to suspect that perhaps I have a different sort of interface.  However, I can’t progress in the tutorials because I can’t find a command line anywhere, and I can’t find any tutorials that tell me how to use interface I have, if that’s what the situation is.  Any advice?

​PostgreSQL is a database service - which means that you don't directly work with it like, say, Microsoft Access.  pgAdminIII is a graphical application that makes doing most things to the database possible.  "SQL Shell (psql)" is effectively a command line version of the same.​

​PostgreSQL is a relational database service.  While it has many features its fundamental behavior is pretty simple.  You can save data into it and then write queries to find answers to questions you have regarding said data - or more simply just to retrieve what was stored.​  You typically don't "launch" it like you would, say, Microsoft Excel.

I don't understand this: "​I'm trying to learn what else to do with the postgreSQL"

There are two typically types of people that "use" PostgreSQL.
1) Those that have a program they want to use that requires (or at least can use) PostgreSQL and so they need to install it and get PostgreSQL to accept the program's requests and data.
2) People writing the programs that Type 1 people will use.

Type 1 people don't need to care what PostgreSQL does as long as the program they do care about functions.

Type 2 people are the ones asking "what else is PostgreSQL capable of".

If you are a Type 1 person I'd probably focus on questions that move you toward getting your other programs working.

If you are trying to become a Type 2 person it sounds like you need to dedicate a considerable amount of time learning how software development works generally and how to use the platform that you will be developing on.  While people here are likely to help this forum is much more specialized.

David J.

Re: Where is the command line?

From
Neil Anderson
Date:
On 2016-03-30 6:05 PM, madler@sfec.us wrote:
> I'm trying to learn postgreSQL.  I installed 9.3.1. on a PC running
> Windows 8.  I needed that version to work with some DHI software.  It
> installed successfully.  I now have a number of postgreSQL associated
> items in my list of apps.  They are:
> Application Stack Builder
> installation notes
> pgadmin documentation
> pgadmin III
> postgreSQL documentation
> postgreSQL release notes
> Reload Configuration
> SQL Shell (psql)
>
> That's The problem is that it doesn’t tell me where to iuse that
> command.  I have no program called “postgreSQL on my computer despite
> successfully installing the software. The only program that has a
> command prompt is the SQL shell one, and that doesn’t seem to be right,
> because none of the things the tutorials say comes next actually happens.
>
> I used the pgadmin III to create a new database and new user in order to
> log into the DHI software.  That's as far as I know what to do with the
> DHI software.  I'm trying to learn what else to do with the postgreSQL,
> so I've looked up a bunch of tutorials.  They all start out
>
> To create a new database, in this example named mydb, use the following
> command:
> $ createdb mydb
>
> That's The problem is that it doesn’t tell me where to use that
> command.  I have no program called “postgreSQL” on my computer despite
> successfully installing the software. The only program that has a
> command prompt is the SQL shell one, and that doesn’t seem to be right,
> because none of the things the tutorials say comes next actually happens.

Hi Michael,

I just had a look in my Windows installation of v9.5 and it appears that
the programs you are looking for are located in the \bin directory.
Something like `C:\Program Files\PostgreSQL\9.5\bin`. So if you are
familiar with Windows you can navigate to that directory via the command
prompt, or from Windows Explorer you can find the directory and just
type 'cmd' in the explorer bar to open a command prompt there.

createdb, initdb, createuser etc. are all in the bin directory and
documented here
http://www.postgresql.org/docs/9.5/static/reference-client.html

It seems that they are programs that wrap particularly useful SQL
commands and execute them on your behalf.

Neil


>
> I looked all over pgadmin and could not find a command line, though it
> does have menu items for creating a new database.  This leads me to
> suspect that perhaps I have a different sort of interface.  However, I
> can’t progress in the tutorials because I can’t find a command line
> anywhere, and I can’t find any tutorials that tell me how to use
> interface I have, if that’s what the situation is.  Any advice?
>
> Michael



Re: Where is the command line?

From
tim.child@comcast.net
Date:
Neil,

psql.exe is the command line tool it's in the bin directory

R
-tim

From: "Neil Anderson" <neil.t.anderson@gmail.com>
To: pgsql-novice@postgresql.org
Sent: Saturday, May 14, 2016 8:20:08 PM
Subject: Re: [NOVICE] Where is the command line?

On 2016-03-30 6:05 PM, madler@sfec.us wrote:
> I'm trying to learn postgreSQL.  I installed 9.3.1. on a PC running
> Windows 8.  I needed that version to work with some DHI software.  It
> installed successfully.  I now have a number of postgreSQL associated
> items in my list of apps.  They are:
> Application Stack Builder
> installation notes
> pgadmin documentation
> pgadmin III
> postgreSQL documentation
> postgreSQL release notes
> Reload Configuration
> SQL Shell (psql)
>
> That's The problem is that it doesn’t tell me where to iuse that
> command.  I have no program called “postgreSQL on my computer despite
> successfully installing the software. The only program that has a
> command prompt is the SQL shell one, and that doesn’t seem to be right,
> because none of the things the tutorials say comes next actually happens.
>
> I used the pgadmin III to create a new database and new user in order to
> log into the DHI software.  That's as far as I know what to do with the
> DHI software.  I'm trying to learn what else to do with the postgreSQL,
> so I've looked up a bunch of tutorials.  They all start out
>
> To create a new database, in this example named mydb, use the following
> command:
> $ createdb mydb
>
> That's The problem is that it doesn’t tell me where to use that
> command.  I have no program called “postgreSQL” on my computer despite
> successfully installing the software. The only program that has a
> command prompt is the SQL shell one, and that doesn’t seem to be right,
> because none of the things the tutorials say comes next actually happens.

Hi Michael,

I just had a look in my Windows installation of v9.5 and it appears that
the programs you are looking for are located in the \bin directory.
Something like `C:\Program Files\PostgreSQL\9.5\bin`. So if you are
familiar with Windows you can navigate to that directory via the command
prompt, or from Windows Explorer you can find the directory and just
type 'cmd' in the explorer bar to open a command prompt there.

createdb, initdb, createuser etc. are all in the bin directory and
documented here
http://www.postgresql.org/docs/9.5/static/reference-client.html

It seems that they are programs that wrap particularly useful SQL
commands and execute them on your behalf.

Neil


>
> I looked all over pgadmin and could not find a command line, though it
> does have menu items for creating a new database.  This leads me to
> suspect that perhaps I have a different sort of interface.  However, I
> can’t progress in the tutorials because I can’t find a command line
> anywhere, and I can’t find any tutorials that tell me how to use
> interface I have, if that’s what the situation is.  Any advice?
>
> Michael



--
Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice