Re: Problems with pg_dump (on Debian i386) - Mailing list pgsql-sql

From Tom Lane
Subject Re: Problems with pg_dump (on Debian i386)
Date
Msg-id 13609.991072020@sss.pgh.pa.us
Whole thread Raw
In response to Re: Problems with pg_dump (on Debian i386)  (Joachim Trinkwitz <jtr@uni-bonn.de>)
List pgsql-sql
Joachim Trinkwitz <jtr@uni-bonn.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


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: order after WHERE clause
Next
From: Martín Marqués
Date:
Subject: Re: Seq Scan