473,407 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

doubt about the database

subscribe
end

hai sir
i am using the postgresql 7.2 my doubt is
what is the command of to see the list of databases
i create a database named "jntuoes"
database created it's displayed
but i want to know the command
so please give me the replay

thak you sir

_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 23 '05 #1
1 1197
On Sun, 2004-09-26 at 01:49, maridu h.s.n.v.prasad wrote:
subscribe
end

hai sir
i am using the postgresql 7.2 my doubt is
what is the command of to see the list of databases
i create a database named "jntuoes"
database created it's displayed
but i want to know the command
so please give me the replay


in psql, you use \l

smarlowe=> \l
List of databases
Name | Owner | Encoding
-----------+----------+-----------
blog | smarlowe | SQL_ASCII
postgres | postgres | SQL_ASCII
smarlowe | smarlowe | SQL_ASCII
template0 | postgres | SQL_ASCII
template1 | postgres | SQL_ASCII
(5 rows)

If you want to execute a command to see it from SQL (i.e. an application
etc...) you can find the queries psql uses by starting it with the -E
switch, like so:

[smarlowe@localhost smarlowe]$ psql -E
Welcome to psql 7.4.5, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

smarlowe=> \l
********* QUERY **********
SELECT d.datname as "Name",
u.usename as "Owner",
pg_catalog.pg_encoding_to_char(d.encoding) as "Encoding"
FROM pg_catalog.pg_database d
LEFT JOIN pg_catalog.pg_user u ON d.datdba = u.usesysid
ORDER BY 1;
**************************

List of databases
Name | Owner | Encoding
-----------+----------+-----------
blog | smarlowe | SQL_ASCII
postgres | postgres | SQL_ASCII
smarlowe | smarlowe | SQL_ASCII
template0 | postgres | SQL_ASCII
template1 | postgres | SQL_ASCII
(5 rows)

Hope that helps.
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: BijuThomas | last post by:
Complicated - ASP/Security/data transfer/XML doubt In our company Head office we are hosting an intranet server in IIS (Windows 2000) , ASP and Sqlserver back end. We are maintaining our branch...
0
by: Praveen | last post by:
Hi All, We have a requirement to develop an application using Java and Oracle 8.1.7.0.0 which supports multiple languages(French,German,Japenies,Chinese etc..). For that i have created a UTF8...
6
by: Luca | last post by:
I have a doubt: is it dangerous to create widgets out of the main thread, or it is dangerous to call methods of a widgets out of the thread which created it? or both? TIA Perry
1
by: Siva sakthi via .NET 247 | last post by:
(Type your message here) -------------------------------- From: Siva sakthi Hi, I have populated the data from database in aspx page using template column.
1
by: javier garcia - CEBAS | last post by:
Hi all; In the documentation I'm missing some explanation about pg_dumpall. I would like to know if there is any difference if I restore an entire database cluster over an existing database or...
5
by: meenu_susi | last post by:
doubt regarding select box....urgent in the below code i am getting data from database..according to the condition.. i want the available data in database to get displayed in selectbox.. for...
3
by: meenu_susi | last post by:
doubt regarding shopping cart...in asp i have a page where user purchase the product.. here i have the product as tshirt.. and for ex..i have shirt sizes as follows s m l xl xxl and...
1
by: Drupan c | last post by:
scenario : There are 10 computers on LAN and one system will have MS SQL installed on it.. now my doubt is how will the c# application route the information into the database .. in the application i...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.