Array access to type "name" - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Array access to type "name"
Date
Msg-id Pine.LNX.4.44.0304261957280.2138-100000@peter.localdomain
Whole thread Raw
Responses Re: Array access to type "name"  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@gmx.net



pgsql-hackers by date:

Previous
From: Sean Chittenden
Date:
Subject: [EXAMPLE] Overly zealous security of schemas...
Next
From: Tom Lane
Date:
Subject: Re: [EXAMPLE] Overly zealous security of schemas...