From: | harrold(at)sage(dot)che(dot)pitt(dot)edu |
---|---|
To: | Willie Northway <willn(at)diamondbullet(dot)com> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: exploring data |
Date: | 2001-06-27 18:28:21 |
Message-ID: | Pine.LNX.4.21.0106271425560.29647-100000@sage.che.pitt.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
|
From | Date | Subject | |
---|---|---|---|
Next Message | Williams, Travis L, NPONS | 2001-06-27 18:29:24 | RE: exploring data |
Previous Message | Willie Northway | 2001-06-27 18:17:59 | exploring data |