From: | Thomas Kellerer <spam_eater(at)gmx(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Table name with umlauts |
Date: | 2010-11-22 18:17:42 |
Message-ID: | icec44$qn3$1@dough.gmane.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
I'm curious why the following is not working:
c:\psql postgres postgres
psql (9.0.1)
Type "help" for help.
postgres=# select version();
version
-------------------------------------------------------------
PostgreSQL 9.0.1, compiled by Visual C++ build 1500, 32-bit
(1 row)
postgres=# select pg_encoding_to_char(encoding) from pg_database where datname = 'postgres';
pg_encoding_to_char
---------------------
UTF8
(1 row)
postgres=# show client_encoding;
client_encoding
-----------------
UTF8
(1 row)
postgres=# create table umlaut_test_ö (id integer);
ERROR: invalid byte sequence for encoding "UTF8": 0xf6202869
postgres=#
(it doesn't work either when I quote the table name using "umlaut_test_ö")
When I run the same create table using a JDBC based tool the table *is* created but the table name does not show up correctly when I use DatabaseMetaData.getTables().
pgAdmin does not show this table correctly and after creating it through JDBC, psql doesn't show the table name correctly either:
postgres=> \d umlaut*
Table "public.umlaut_test_ã¶"
Column | Type | Modifiers
--------+---------+-----------
id | integer |
I initially posted this on the JDBC mailing list because I noticed this with Java, but it seems that it's not a JDBC problem.
Could this be a Windows problem?
Note: I don't really want to use such a table name, I'm just wondering if this _should_ work.
Regards
Thomas
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2010-11-22 18:25:58 | Re: Table name with umlauts |
Previous Message | Turner, John J | 2010-11-22 16:31:59 | extensions: creation of .sql files |