Skip site navigation (1) Skip section navigation (2)

Re: Garbage characters for \d table?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: josh(at)agliodbs(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Garbage characters for \d table?
Date: 2004-08-17 20:05:24
Message-ID: 9184.1092773124@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Josh Berkus <josh(at)agliodbs(dot)com> writes:
> UPDATE:  Turns out the garbage characters were actually in the field names 
> themselves.   Somehow a previous bad connection caused line breaks to get 
> replaced with unicode garbage when I created the table.   It seems like, in 
> PSQL, the use of non-ASCII characters should require quoted identifiers, but 
> apparently not?

No, that's deliberate: any byte >= octal 200 is allowed as part of an
unquoted identifier.  Non-English-speaking users would get quite upset
with us if they had to quote, say, e-acute to use it in an identifier.

Ideally I suppose we'd restrict it to just characters that actually have
some letter nature to them, but the trouble with that is it'd make the
backend lexical rules encoding-dependent, which is bad news for a number
of reasons.  So we allow 200-377 in all cases.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Bruce MomjianDate: 2004-08-17 20:22:35
Subject: Re: 8.0.0 beta 1, contrib/dbsize, GetDatabasePath wrong
Previous:From: Tom LaneDate: 2004-08-17 20:00:03
Subject: Re: Garbage characters for \d table?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group