Re: Problems with pg_dump (on Debian i386)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joachim Trinkwitz <jtr(at)uni-bonn(dot)de>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Problems with pg_dump (on Debian i386)
Date: 2001-05-28 17:47:00
Message-ID: 13609.991072020@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Joachim Trinkwitz <jtr(at)uni-bonn(dot)de> writes:
> CREATE TABLE "lplan" (
> ...
> "art" character[] NOT NULL,

I believe that PG 7.1 interprets that field declaration as

"art" character(1)[] NOT NULL,

and then truncates your input to match. 7.2-to-be rejects the input
with complaints like
psql:germdb.sql:20: ERROR: value too long for type character(1)
which is the SQL-specified behavior for char(n) fields.

Since you appear to be using different string lengths in your data,
I doubt char(n) is the right datatype to begin with. I suggest

"art" varchar(n)[] NOT NULL,

for some appropriate n.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2001-05-28 18:12:19 Re: order after WHERE clause
Previous Message Kovacs Zoltan 2001-05-28 16:37:18 order after WHERE clause