Thread: database

database

From
"Jovito BalsamXo dos Santos"
Date:
Hello, group's users,

I would like to know how i can select all the database from the server. It's
like below:

select database (in mysql)

since naw, tanks!

_________________________________________________________________
MSN Messenger: instale gr�tis e converse com seus amigos.
http://messenger.msn.com.br


Re: database

From
"A. Kretschmer"
Date:
am  21.11.2005, um 13:55:01 -0200 mailte Jovito BalsamXo dos Santos folgendes:
>
> Hello, group's users,
>
> I would like to know how i can select all the database from the server.
> It's like below:

1. you can use 'psql -l' to list all databases
2. within psql, you can use '\l' to list all databases
3. You can use SQL:

   SELECT d.datname as "Name",
          r.rolname as "Owner",
          pg_catalog.pg_encoding_to_char(d.encoding) as "Encoding"
   FROM pg_catalog.pg_database d
     LEFT JOIN pg_catalog.pg_roles r ON d.datdba = r.oid
   ORDER BY 1;

   Hint: this is the result if you start psql with -E and the run \l.


HTH, Andreas
--
Andreas Kretschmer    (Kontakt: siehe Header)
Heynitz:  035242/47212,      D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
 ===    Schollglas Unternehmensgruppe    ===