newbie question

Started by Said Badrul Naharover 24 years ago6 messagesgeneral
Jump to latest
#1Said Badrul Nahar
saidbn@yahoo.com

I'm new with postgresql. How can i show table name and db name in
postgresql like SHOW TABLE and SHOW DATABASE in MySQL.

Thanks
Said Badrul Nahar

#2Dr. Evil
drevil@sidereal.kz
In reply to: Said Badrul Nahar (#1)
Re: newbie question

I'm new with postgresql. How can i show table name and db name in
postgresql like SHOW TABLE and SHOW DATABASE in MySQL.

The equivalent of SHOW TABLE foo; in pg would be:

\d foo

Note that there is no ; at the end of that command.

I'm not sure what's equivalent to SHOW DATABASE.

#3Aasmund Midttun Godal
postgresql@envisity.com
In reply to: Said Badrul Nahar (#1)
Re: newbie question

just \d

...

On 5 Nov 2001 00:43:45 -0000, "Dr. Evil" <drevil@sidereal.kz> wrote:

The equivalent of SHOW TABLE foo; in pg would be:

\d foo

Note that there is no ; at the end of that command.

I'm not sure what's equivalent to SHOW DATABASE.

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Aasmund Midttun Godal

aasmund@godal.com - http://www.godal.com/
+47 40 45 20 46

#4Lee Harr
missive@frontiernet.net
In reply to: Said Badrul Nahar (#1)
Re: newbie question

I'm new with postgresql. How can i show table name and db name in
postgresql like SHOW TABLE and SHOW DATABASE in MySQL.

In psql:

\d
\l
\?

to show:
tables
databases
other backslash commands

#5Aasmund Midttun Godal
postgresql@envisity.com
In reply to: Said Badrul Nahar (#1)
Re: newbie question

erm, sorry, if you wanna see all the databases you can always:

SELECT datname FROM pg_database;

On Mon, 05 Nov 2001 01:27:29 GMT, "Aasmund Midttun Godal" <postgresql@envisity.com> wrote:

just \d

...

On 5 Nov 2001 00:43:45 -0000, "Dr. Evil" <drevil@sidereal.kz> wrote:

Aasmund Midttun Godal

aasmund@godal.com - http://www.godal.com/
+47 40 45 20 46

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Aasmund Midttun Godal

aasmund@godal.com - http://www.godal.com/
+47 40 45 20 46

#6Roderick A. Anderson
raanders@tincan.org
In reply to: Dr. Evil (#2)
Re: newbie question

On 5 Nov 2001, Dr. Evil wrote:

I'm not sure what's equivalent to SHOW DATABASE.

A SWAG would be \d, \di, and \dv. Tables and sequences, indexes, and
views.

Rod
--
Let Accuracy Triumph Over Victory

Zetetic Institute
"David's Sling"
Marc Stiegler