RE: what is the equivalent of oracle's DESCRIBE table?

From: Andrew Perrin - Demography <aperrin(at)demog(dot)berkeley(dot)edu>
To: chris markiewicz <cmarkiew(at)commnav(dot)com>
Cc: "'PostgreSQL General' (E-mail)" <pgsql-general(at)postgresql(dot)org>
Subject: RE: what is the equivalent of oracle's DESCRIBE table?
Date: 2000-09-15 15:51:48
Message-ID: Pine.WNT.4.05.10009151151200.281-100000@slovo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

use \d <tablename>

postgres(at)davis ~> psql demogdata
Welcome to the POSTGRESQL interactive sql monitor:
Please read the file COPYRIGHT for copyright terms of POSTGRESQL
[PostgreSQL 6.5.0 on sparc-sun-solaris2.6, compiled by /usr/local/bin/gcc
]

type \? for help on slash commands
type \q to quit
type \g or terminate with semicolon to execute query
You are currently connected to the database: demogdata

demogdata=> \d event_detail
Table = event_detail
+----------------------------------+----------------------------------+-------+
| Field | Type |
Length|
+----------------------------------+----------------------------------+-------+
| event_id | int4 not null default nextval('" |
4 |
| dt1eventid | int2 |
2 |
| eventtypeid | int4 |
4 |
| id | int4 |
4 |
| date_effective | datetime |
8 |
| date_expires | datetime |
8 |
| expected | bool |
1 |
| title | varchar() |
150 |
| sourceid | int4 |
4 |
| cost | float8 |
8 |
| spec1 | varchar() |
50 |
| spec2 | varchar() |
50 |
| spec3 | varchar() |
50 |
| spec4 | varchar() |
50 |
| spec5 | varchar() |
50 |
| spec6 | varchar() |
50 |
| spec7 | varchar() |
50 |
| spec8 | varchar() |
50 |
| comments | text |
var |
| current_interests | text |
var |
| updated | varchar() |
25 |
| override | varchar() |
25 |
| semester | varchar() |
15 |
| acadyear | varchar() |
12 |
| chair | int4 |
4 |
| member1 | int4 |
4 |
| member2 | int4 |
4 |
| degree | varchar() |
5 |
+----------------------------------+----------------------------------+-------+
Indices: date_effective_idx
etid_detail_idx
event_detail_event_id_key

---------------------------------------------------------------------
Andrew J. Perrin - aperrin(at)demog(dot)berkeley(dot)edu - NT/Unix Admin/Support
Department of Demography - University of California at Berkeley
2232 Piedmont Avenue #2120 - Berkeley, California, 94720-2120 USA
http://demog.berkeley.edu/~aperrin --------------------------SEIU1199

On Fri, 15 Sep 2000, chris markiewicz wrote:

> \dt <table name> only seems to list Owner, Relation, and Type.
>
> i am looking for something that returns the same info that is found in a
> CREATE TABLE statement...column names, data types, etc. i haven't seen
> anything like this in the documentation...
>
> thanks
> chris
>
> -----Original Message-----
> From: Len Morgan [mailto:len-morgan(at)crcom(dot)net]
> Sent: Friday, September 15, 2000 9:48 AM
> To: cmarkiew(at)commnav(dot)com
> Subject: Re: [GENERAL] what is the equivalent of oracle's DESCRIBE
> table?
>
>
> in psql: \dt <table name>
>
> -----Original Message-----
> From: chris markiewicz <cmarkiew(at)commnav(dot)com>
> To: 'PostgreSQL General' <pgsql-general(at)postgresql(dot)org>
> Date: Friday, September 15, 2000 8:51 AM
> Subject: [GENERAL] what is the equivalent of oracle's DESCRIBE table?
>
>
> >hello.
> >
> >what is the postgres equivalent of oracle's command-line DESCRIBE <table>
> >command? does there exist a sql92 command for this?
> >
> >thank you
> >chris
> >
> >
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message James Hall 2000-09-15 15:52:32 RE: are my questions being received?
Previous Message Hernan 2000-09-15 15:50:27 Re: are my questions being received?