Re: exploring data - Mailing list pgsql-novice

From harrold@sage.che.pitt.edu
Subject Re: exploring data
Date
Msg-id Pine.LNX.4.21.0106271425560.29647-100000@sage.che.pitt.edu
Whole thread Raw
In response to exploring data  (Willie Northway <willn@diamondbullet.com>)
Responses Re: exploring data  (Willie Northway <willn@diamondbullet.com>)
List pgsql-novice

--
john

Sometime in June Willie Northway assaulted keyboard and produced...

|
|Hello, I'm a mysql user who's trying to learn postgres. How would I
|explore which databases or tables are available for use?
|
|If I were using mysql, I would try something like this:
|
|mysql> show databases;
|mysql> use test;


normally when postgres is started you tell it the database.

so it looks something like
psql dbname

then to show the tables
dbname=# \d
will list all the tables, sequences, etc in a "more" fashion

then to get info about a table just type

dbname=# \d table

this will give you a list of the columns and datatypes.

i dont know how to list the available databaes.

i hope this helps.

|mysql> show tables;
|
|How would I accomplish something like this in postgres?
|
|- Willie
|
|----
|Willie Northway - Software Developer http://www.willienorthway.com/
|Diamond Bullet Design - http://www.diamondbullet.com
|
|
|---------------------------(end of broadcast)---------------------------
|TIP 6: Have you searched our list archives?
|
|http://www.postgresql.org/search.mpl
|


pgsql-novice by date:

Previous
From: Willie Northway
Date:
Subject: exploring data
Next
From: "Williams, Travis L, NPONS"
Date:
Subject: RE: exploring data