Re: Problems with pg_dump (on Debian i386)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Problems with pg_dump (on Debian i386)
Дата
Msg-id 13609.991072020@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Problems with pg_dump (on Debian i386)  (Joachim Trinkwitz <jtr@uni-bonn.de>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: order after WHERE clause
Следующее
От: Martín Marqués
Дата:
Сообщение: Re: Seq Scan