Array access to type "name"

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Array access to type "name"
Date: 2003-04-26 21:07:17
Message-ID: Pine.LNX.4.44.0304261957280.2138-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The type "name" can be subscripted like an array to access the individual
"char" elements. But since a character stored in a "name" value isn't
necessarily one byte, this is incorrect. Does anything rely on this
facility, or would it be better to remove it for type "name"?

Here's an example that produces a failure:

$ export PGCLIENTENCODING=latin1
$ createdb -E UNICODE test
$ psql test
=> create table åland (a int);
=> create table überschall (b int);
=> select relname[0] from pg_class;
ERROR: Could not convert UTF-8 to ISO8859-1

--
Peter Eisentraut peter_e(at)gmx(dot)net

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-04-26 21:17:45 Re: [EXAMPLE] Overly zealous security of schemas...
Previous Message Sean Chittenden 2003-04-26 20:48:23 [EXAMPLE] Overly zealous security of schemas...