pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedsimple questions
7+ messages / 5 participants
[nested] [flat]
* simple questions
@ 2000-12-15 21:45 Niral Trivedi <niral.trivedi@insage.com>
2000-12-15 21:52 ` Re: simple questions Brian Horan <bhoran@herald.com>
2000-12-15 21:55 ` Re: simple questions Jie Liang <jliang@ipinc.com>
2000-12-15 21:56 ` Re: [GENERAL] simple questions Brett W. McCoy <bmccoy@chapelperilous.net>
2000-12-15 21:57 ` Re: simple questions Jie Liang <jliang@ipinc.com>
2000-12-15 22:00 ` Re: simple questions Oliver Elphick <olly@lfix.co.uk>
0 siblings, 5 replies; 7+ messages in thread
From: Niral Trivedi @ 2000-12-15 21:45 UTC (permalink / raw)
To: pgsql-general@postgresql.org; +Cc: pgsql-admin
All,
I have very simple two questions..
How can we 'describe a table' and 'view all available tables' in postgres
DB??
I am looking for something similar to 'desc <TABLE>' and 'show tables' in
MySQL or
'desc <TABLE>' and 'select * from tab' in Oracle..
Thanks in advance for your help..
Niral
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: simple questions
2000-12-15 21:45 simple questions Niral Trivedi <niral.trivedi@insage.com>
@ 2000-12-15 21:52 ` Brian Horan <bhoran@herald.com>
4 siblings, 0 replies; 7+ messages in thread
From: Brian Horan @ 2000-12-15 21:52 UTC (permalink / raw)
To: Niral Trivedi <niral.trivedi@insage.com>; +Cc: pgsql-admin
Niral Trivedi wrote:
>
> All,
>
> I have very simple two questions..
>
> How can we 'describe a table' and 'view all available tables' in postgres
> DB??
>
> I am looking for something similar to 'desc <TABLE>' and 'show tables' in
> MySQL or
> 'desc <TABLE>' and 'select * from tab' in Oracle..
>
> Thanks in advance for your help..
>
> Niral
easily.
psql#> \d table_name
for a specific table
psql#> \d
for all tables
and \? for other useful stuff with backslashes.
--
,~,
v Brian Horan
/(|)\ Systems Analyst/Programmer
/( | )\ Miami Herald Publishing Company
//( | )\\ bhoran@herald.com cell: (954) 296-7807
-----"-"-----------------------------------------
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: simple questions
2000-12-15 21:45 simple questions Niral Trivedi <niral.trivedi@insage.com>
@ 2000-12-15 21:55 ` Jie Liang <jliang@ipinc.com>
4 siblings, 0 replies; 7+ messages in thread
From: Jie Liang @ 2000-12-15 21:55 UTC (permalink / raw)
To: Niral Trivedi <niral.trivedi@insage.com>; +Cc: pgsql-admin
Hi, there,
in psql use
\d tablename
BTW
you can use
\? to list all related command
Jie LIANG
Internet Products Inc.
10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873
jliang@ipinc.com
www.ipinc.com
On Fri, 15 Dec 2000, Niral Trivedi wrote:
> All,
>
> I have very simple two questions..
>
> How can we 'describe a table' and 'view all available tables' in postgres
> DB??
>
> I am looking for something similar to 'desc <TABLE>' and 'show tables' in
> MySQL or
> 'desc <TABLE>' and 'select * from tab' in Oracle..
>
> Thanks in advance for your help..
>
> Niral
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [GENERAL] simple questions
2000-12-15 21:45 simple questions Niral Trivedi <niral.trivedi@insage.com>
@ 2000-12-15 21:56 ` Brett W. McCoy <bmccoy@chapelperilous.net>
4 siblings, 0 replies; 7+ messages in thread
From: Brett W. McCoy @ 2000-12-15 21:56 UTC (permalink / raw)
To: Niral Trivedi <niral.trivedi@insage.com>; +Cc: pgsql-general@postgresql.org; pgsql-admin
On Fri, 15 Dec 2000, Niral Trivedi wrote:
> I have very simple two questions..
>
> How can we 'describe a table' and 'view all available tables' in postgres
> DB??
>
> I am looking for something similar to 'desc <TABLE>' and 'show tables' in
> MySQL or
> 'desc <TABLE>' and 'select * from tab' in Oracle..
If you are using the psql app, \d will show you all relations (tables,
sequences, etc). \dt will show all tables, \dt <table> will show the
details of a particualr table. See the online help \? for more info.
-- Brett
http://www.chapelperilous.net/~bmccoy/
---------------------------------------------------------------------------
If we all work together, we can totally disrupt the system.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: simple questions
2000-12-15 21:45 simple questions Niral Trivedi <niral.trivedi@insage.com>
@ 2000-12-15 21:57 ` Jie Liang <jliang@ipinc.com>
4 siblings, 0 replies; 7+ messages in thread
From: Jie Liang @ 2000-12-15 21:57 UTC (permalink / raw)
To: Niral Trivedi <niral.trivedi@insage.com>; +Cc: pgsql-admin
\d tablename
\dt --- list all tables
\dv --- list all views
Jie LIANG
Internet Products Inc.
10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873
jliang@ipinc.com
www.ipinc.com
On Fri, 15 Dec 2000, Niral Trivedi wrote:
> All,
>
> I have very simple two questions..
>
> How can we 'describe a table' and 'view all available tables' in postgres
> DB??
>
> I am looking for something similar to 'desc <TABLE>' and 'show tables' in
> MySQL or
> 'desc <TABLE>' and 'select * from tab' in Oracle..
>
> Thanks in advance for your help..
>
> Niral
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: simple questions
2000-12-15 21:45 simple questions Niral Trivedi <niral.trivedi@insage.com>
@ 2000-12-15 22:00 ` Oliver Elphick <olly@lfix.co.uk>
4 siblings, 0 replies; 7+ messages in thread
From: Oliver Elphick @ 2000-12-15 22:00 UTC (permalink / raw)
To: Niral Trivedi <niral.trivedi@insage.com>; +Cc: pgsql-admin
Niral Trivedi wrote:
>All,
>
>I have very simple two questions..
>
>How can we 'describe a table' and 'view all available tables' in postgres
>DB??
>
>I am looking for something similar to 'desc <TABLE>' and 'show tables' in
>MySQL or
>'desc <TABLE>' and 'select * from tab' in Oracle..
In psql:
\d lists all tables
\d table lists all columns in a table
use \? for help on psql commands and \h for help on SQL commands
Start psql with -E to see the SQL queries that \d produces.
--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"The fear of the LORD is the instruction of wisdom, and
before honour is humility." Proverbs 15:33
^ permalink raw reply [nested|flat] 7+ messages in thread
* RE: simple questions
@ 2000-12-15 22:01 Niral Trivedi <niral.trivedi@insage.com>
0 siblings, 0 replies; 7+ messages in thread
From: Niral Trivedi @ 2000-12-15 22:01 UTC (permalink / raw)
To: 'Jie Liang' <jliang@ipinc.com>; +Cc: pgsql-admin
Thank you all for your such a quick response..
Niral
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2000-12-15 22:01 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-12-15 21:45 simple questions Niral Trivedi <niral.trivedi@insage.com>
2000-12-15 21:52 ` Brian Horan <bhoran@herald.com>
2000-12-15 21:55 ` Jie Liang <jliang@ipinc.com>
2000-12-15 21:56 ` Brett W. McCoy <bmccoy@chapelperilous.net>
2000-12-15 21:57 ` Jie Liang <jliang@ipinc.com>
2000-12-15 22:00 ` Oliver Elphick <olly@lfix.co.uk>
2000-12-15 22:01 RE: simple questions Niral Trivedi <niral.trivedi@insage.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox