Re: pg_dump 8.0.3 failing against PostgreSQL 7.3.2

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_dump 8.0.3 failing against PostgreSQL 7.3.2
Дата
Msg-id 8623.1118157654@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_dump 8.0.3 failing against PostgreSQL 7.3.2  (Jochem van Dieten <jochemd@oli.tudelft.nl>)
Список pgsql-general
Jochem van Dieten <jochemd@oli.tudelft.nl> writes:
> Tom Lane wrote:
> [ light dawns ]  You've created a table named "text", haven't you?

> Yes, there is such a table. But even if I put the schema with
> that table in the search_path I can't reproduce the error from psql.

You can if you duplicate pg_dump's search path:

regression=# create schema s1
regression-#   create table text (f1 int);
CREATE SCHEMA
regression=# set search_path = s1, pg_catalog;
SET
regression=# select null::text;
ERROR:  Cannot cast type "unknown" to text
regression=#

Note that the above is using a 7.3 server --- more recent servers will
take this, not because they parse the "text" type reference differently,
but because they don't have a problem with null composite values.

> I prefer the interpretation "My customer needs to change his
> schema if he wants backups" :)
> I will test the patch, but it will take a few days because I
> haven't got the toolchain set up.

A short-term workaround is to use 7.3 or 7.4 pg_dump --- this pg_dump
error was introduced in 8.0.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Update sql question
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Update sql question