Re: database - Mailing list pgsql-novice

From A. Kretschmer
Subject Re: database
Date
Msg-id 20051127062804.GA17081@webserv.wug-glas.de
Whole thread Raw
In response to database  ("Jovito BalsamXo dos Santos" <jovitomg@msn.com>)
List pgsql-novice
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    ===

pgsql-novice by date:

Previous
From: Thomas Harold
Date:
Subject: MSSQL migration questions
Next
From: Andreas Kretschmer
Date:
Subject: Re: MSSQL migration questions