Where can I find the documentation to SQL shell (psql)?

View: New views
4 Messages — Rating Filter:   Alert me  

Where can I find the documentation to SQL shell (psql)?

by Henri De Feraudy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,
 I just installed PostgreSL on windows XP. Now if I click on the Start button and then on Programs and then PostgreSQL 8.4 one of the items is "SQL shell (psql)".
I cant find the documentation to this. In the document called PostgreSQL 8.4.1 documentation there is no occurrence of the word "Shell".
Henri

_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

Re: Where can I find the documentation to SQL shell (psql)?

by Paul Ramsey-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

the shell is called "psql" and there's lot of help on that.
also, in the terminal itself, the "\?" command gives a list of
specific terminal commands and "\h" gives a SQL reference manual.

P

On Wed, Oct 14, 2009 at 10:42 AM, Henri De Feraudy <feraudyh@...> wrote:

> Hello,
>  I just installed PostgreSL on windows XP. Now if I click on the Start button and then on Programs and then PostgreSQL 8.4 one of the items is "SQL shell (psql)".
> I cant find the documentation to this. In the document called PostgreSQL 8.4.1 documentation there is no occurrence of the word "Shell".
> Henri
>
> _______________________________________________
> postgis-users mailing list
> postgis-users@...
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

Re: Where can I find the documentation to SQL shell (psql)?

by Rick-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Henri

To get you started, this is what I do for a new install.  (to get you into psql)

First of all you need a user, the only initial user is 'postgres'

Also, you need to specify a database, the default is the database that
is the same name as the user.   There is one called 'postgres'

become the postgres user.
# su postgres  (or sudo su postgres)
# psql
Welcome to psql 8.3.8, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit

postgres=# create role <you> with login superuser password <password>;
postgres=# ^D (or \q)
# ^D

you can now run psql as yourself, but you will want to create a
database to operate on...

# createdb <database>

# psql <database>

you're in.  you will have noticed that you get

enjoy, psql rocks for command line data manipulation and piping (as a filter)

On Wed, Oct 14, 2009 at 1:42 PM, Henri De Feraudy <feraudyh@...> wrote:

> Hello,
>  I just installed PostgreSL on windows XP. Now if I click on the Start button and then on Programs and then PostgreSQL 8.4 one of the items is "SQL shell (psql)".
> I cant find the documentation to this. In the document called PostgreSQL 8.4.1 documentation there is no occurrence of the word "Shell".
> Henri
>
> _______________________________________________
> postgis-users mailing list
> postgis-users@...
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>



--
Cheers!
Rick
_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

Re: Where can I find the documentation to SQL shell(psql)?

by Paragon Corporation-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Henri,
We created a cheat sheet for psql for PostgreSQL 8.3.  There are some bells
and whistles that were added in 8.4, but the cheat sheet should be god
enough for starting.  Is pretty much the help screen a bit more organized
and some example usecases

http://www.postgresonline.com/journal/index.php?/archives/91-PostgreSQL-8.3-
PSQL-Cheatsheet-Overview.html

We've also got some other PostgreSQL specific cheat sheets in our specials
section that you might find useful

http://www.postgresonline.com/specials.php

Leo

-----Original Message-----
From: postgis-users-bounces@...
[mailto:postgis-users-bounces@...] On Behalf Of Henri De
Feraudy
Sent: Wednesday, October 14, 2009 1:42 PM
To: postgis-users@...
Subject: [postgis-users] Where can I find the documentation to SQL
shell(psql)?

Hello,
 I just installed PostgreSL on windows XP. Now if I click on the Start
button and then on Programs and then PostgreSQL 8.4 one of the items is "SQL
shell (psql)".
I cant find the documentation to this. In the document called PostgreSQL
8.4.1 documentation there is no occurrence of the word "Shell".
Henri

_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users


_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users