nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

Howto list or display databases on a PostgreSQL PgSQL server

This is a discussion on Howto list or display databases on a PostgreSQL PgSQL server within the Databases servers forums, part of the Mastering Servers category; Hai all, How do I list database names on a PostgreSQL database server? TIA...

Register free or login to your existing account and remove all advertisements.


Go Back   nixCraft Linux Forum > Mastering Servers > Databases servers

Linux answers from nixCraft.


Databases servers Discussions of databases of all types - especially MySQL.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-06-2007, 01:13 PM
sweta's Avatar
Contributors
User
 
Join Date: Feb 2005
Location: New Delhi
OS: Suse, RHEL, Vista
Posts: 199
Thanks: 12
Thanked 9 Times in 9 Posts
Rep Power: 7
sweta has a spectacular aura about sweta has a spectacular aura about
Default Howto list or display databases on a PostgreSQL PgSQL server

Hai all,

How do I list database names on a PostgreSQL database server?

TIA
__________________
Reply With Quote
  #2 (permalink)  
Old 03-06-2007, 01:17 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,668
Thanks: 11
Thanked 240 Times in 180 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Login to pgsql server using any one of the command:
Code:
su - postgres
psql template1
OR
Code:
su - postgres
psql -d template1 -U postgres
Type \l
Code:
 template1# \l
You can also use psql itself
Code:
su - postgres
psql -l
To get help type
Code:
\h
and
Code:
psql --help
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
UNIX Display or list number of files in a current directory raj Getting started tutorials 1 12-07-2007 11:55 AM
MySQL remote server access howto raj Databases servers 0 07-29-2007 06:32 AM
Oracle "show databases" list raj Databases servers 1 05-18-2007 02:21 AM
How do I backup MySQL Databases? chiku All about FreeBSD/OpenBSD/NetBSD 2 08-19-2006 08:15 PM
ReCompiling PHP with Pgsql sonaikar Linux software 1 02-23-2006 05:42 PM


All times are GMT +5.5. The time now is 04:40 PM.


Powered by vBulletin® Version 3.8.4 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2009 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38