Re: database

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: database
Date: 2005-11-27 06:28:04
Message-ID: 20051127062804.GA17081@webserv.wug-glas.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 ===

In response to

  • database at 2005-11-21 15:55:01 from Jovito BalsamXo dos Santos

Browse pgsql-novice by date

  From Date Subject
Next Message Andreas Kretschmer 2005-11-27 07:03:19 Re: MSSQL migration questions
Previous Message Thomas Harold 2005-11-27 05:33:34 MSSQL migration questions