LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-16-2003, 08:49 AM   #1
Tim K.
LQ Newbie
 
Registered: Jul 2003
Location: Khon Kaen, Thailand
Distribution: Red Hat 9.0
Posts: 10

Rep: Reputation: 0
show databases; & describe tablename for PostgreSQL


What are PostgreSQL PGSQL commands for showing all databases / table details in my machine, like MySQL has show databases & describe tablename?

Thank you for your time.
 
Old 07-16-2003, 09:59 AM   #2
m0rl0ck
Member
 
Registered: Nov 2002
Distribution: A totally 133t distro :)
Posts: 358

Rep: Reputation: 31
"\l" followed by enter shows all dbs
"\d followed by enter shows all tables in the current db

"\?" followed by enter shows all the availabe slash commands
 
Old 07-16-2003, 11:14 AM   #3
Tim K.
LQ Newbie
 
Registered: Jul 2003
Location: Khon Kaen, Thailand
Distribution: Red Hat 9.0
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks m0rl0ck. That's it.
 
Old 07-16-2003, 11:52 PM   #4
m0rl0ck
Member
 
Registered: Nov 2002
Distribution: A totally 133t distro :)
Posts: 358

Rep: Reputation: 31
Hey if youve got apache and php phppgadmin gives you a nice web interface to postgres:

http://phppgadmin.sourceforge.net/

Its what I usually use, its dependable.
 
Old 07-24-2003, 02:36 AM   #5
abd_bela
Member
 
Registered: Dec 2002
Location: algeria
Distribution: redhat 7.3, debian lenny
Posts: 627

Rep: Reputation: 31
hi,
I am new to postgresql,
I install it with rpm (red8.0), i create database and user, that ok. when I wnat to connect from another site ( or in the same machine with precising the server i doesn't find it.
I didn't give any server name to the postgres, where to do it , what is the name by default

this is the example :

[bela@info-50 bdEtud]$ psql etudiant -h localhost
psql: could not connect to server: Connection refused
Is the server running on host localhost and accepting
TCP/IP connections on port 5432?
[bela@info-50 bdEtud]$

If I omit -h localhost it runs correctly

thanks
 
Old 07-25-2003, 02:49 AM   #6
m0rl0ck
Member
 
Registered: Nov 2002
Distribution: A totally 133t distro :)
Posts: 358

Rep: Reputation: 31
Quote:
Is the server running on host localhost and accepting
TCP/IP connections on port 5432?
is it running on port 5432?

the output of:
"netstat -pant | grep post"

Should have in it:
tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN 1103/postmaster


If it doesnt you need to make sure that pg_ctl is starting postmaster with the "-i" flag.

here is the line I use to start postgres exactly as it appears in my init script:

su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -o "-i" -D $PGDATA -p /usr/bin/postmaster start> /dev/null 2>&1" < /dev/null

Also take a look at your pg_hba.conf file with an eye to security. As with any service that opens a port you need to take some precautions. Depending on how much use the server gets you might also need to increase the amount of shared memory allocated too.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FC2 PHP & POstgresql Megrain Linux - Newbie 3 09-08-2005 08:42 AM
how do you describe what you do? mcd Slackware 1 02-09-2005 06:16 PM
Hard drives start at hdc && fdisk doesn't show hde triet Linux - Hardware 0 11-03-2004 09:25 PM
jdbc & postgresql pelgrimforever Linux - Software 2 08-27-2004 11:15 AM
postgresql -odbc & postgresql-jdbc installation kjsubbu Linux - Software 0 06-19-2003 02:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration