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:00:03
Message-ID: 9109.1092772803@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Josh Berkus <josh(at)agliodbs(dot)com> writes:
> When I do a \d on one table in PSQL, I get the following:

> Table "public.elbs_timekeep"
> Column | Type | Modifiers
> -------------------+-----------------------------+-----------
> 240240240240240240240240tkinit | character varying(8) |
> 240240240240240240240240tksort | integer |
> 240240240240240240240240tklast | character varying(20) |

[ scratches head... ] What's the actual names of the columns, as seen
in a less broken \d display?

I'm wondering if this is a character set encoding conversion gone wild,
or some such. What is the database encoding, what is the client
encoding (and are they the same in the working and nonworking cases)?

The misaligned column headings suggest that each "240" was thought by
psql to be a single character. I suspect it is actually an octal 240
byte inside psql (it may or may not be that at the server). The
expansion to three characters "240" must be happening after psql prints
the data. What terminal program are you using? Is there anything else
between you and psql (ssh tunnel, etc)?

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2004-08-17 20:05:24 Re: Garbage characters for \d table?
Previous Message Josh Berkus 2004-08-17 19:58:17 Re: Garbage characters for \d table?