Re: pg_dump 8.0.3 failing against PostgreSQL 7.3.2

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jochem van Dieten <jochemd(at)oli(dot)tudelft(dot)nl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_dump 8.0.3 failing against PostgreSQL 7.3.2
Date: 2005-06-07 15:20:54
Message-ID: 8623.1118157654@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jochem van Dieten <jochemd(at)oli(dot)tudelft(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Marty Scholes 2005-06-07 15:30:13 Re: Postgresql and Software RAID/LVM
Previous Message Richard Huxton 2005-06-07 15:19:37 Re: Update sql question