RES: pg_enconding

From: Gustavo Franklin Nóbrega - Planae <gfnobrega(at)planae(dot)com(dot)br>
To: "'Dextra - Gustavo Bartz Guedes'" <gustavo-bartz(at)dextra(dot)com(dot)br>, <pgsql-admin(at)postgresql(dot)org>
Subject: RES: pg_enconding
Date: 2005-04-18 17:24:40
Message-ID: 20050418172541.94C4A535AD@svr1.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi Gustavo,

pg_encoding has been removed, because is not need anymore. Try this
query to see what encoding a database have.

SELECT pg_database.datname as "Database",
pg_user.usename as "Owner",
pg_encoding_to_char(pg_database.encoding) as "Encoding"FROM
pg_database, pg_user
WHERE pg_database.datdba = pg_user.usesysid
UNION
SELECT pg_database.datname as "Database",
NULL as "Owner",
pg_encoding_to_char(pg_database.encoding) as "Encoding"FROM
pg_database
WHERE pg_database.datdba NOT IN (SELECT usesysid FROM pg_user)
ORDER BY "Database";

This query was copied from
http://archives.postgresql.org/pgsql-php/2001-10/msg00071.php. Thanks to
Alessandro Ferrarin.

Gustavo Franklin Nóbrega
gfnobrega(at)planae(dot)com(dot)br
Infraestrutura e Banco de Dados
Planae Tecnologia da Informação
(+55) 14 2106-3514
http://www.planae.com.br

-----Mensagem original-----
De: pgsql-admin-owner(at)postgresql(dot)org
[mailto:pgsql-admin-owner(at)postgresql(dot)org] Em nome de Dextra - Gustavo Bartz
Guedes
Enviada em: segunda-feira, 18 de abril de 2005 13:35
Para: pgsql-admin(at)postgresql(dot)org
Assunto: [ADMIN] pg_enconding

The version 8.0 has not the pg_encoding tool, so how can I find a
encoding by its number on pg_database.enconding?

Thanks.

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

In response to

  • pg_enconding at 2005-04-18 16:34:37 from Dextra - Gustavo Bartz Guedes

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2005-04-18 17:34:42 Re: pg_enconding
Previous Message Bruce Momjian 2005-04-18 17:08:33 Re: pg_temp_xxx schemas