Re: pg_dump 8.0.3 failing against PostgreSQL 7.3.2

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

Tom Lane wrote:
>
> Well, that trace makes it look like it's unhappy about the "null::text"
> in the command, because there is no other typecast in the SELECT target
> statement. Looking at the 7.3 code, the only very plausible reason for
> the failure is if either "unknown" or "text" has disappeared from
> pg_type, so that one of the typeidIsValid tests in can_coerce_type
> fails. But that doesn't explain why you don't see the failure
> interactively --- seems like "select null::text" should always fail in
> that database, if that's where the problem is.
>
> I confess to bewilderment ... anyone have a clue?

If I check pg_type in the database with the problem for typname
unknown or text I get 3 rows. In other databases I get only 2 rows.

Jochem

Problem database:
> wedstrijdzeilen=> select * from pg_type where typname in ('unknown','text') order by typname;
> typname | typnamespace | typowner | typlen | typbyval | typtype | typisdefined | typdelim | typrelid | typelem | typinput | typoutput | t
> ypalign | typstorage | typnotnull | typbasetype | typtypmod | typndims | typdefaultbin | typdefault
> ---------+--------------+----------+--------+----------+---------+--------------+----------+----------+---------+-----------+------------+--
> --------+------------+------------+-------------+-----------+----------+---------------+------------
> text | 11 | 1 | -1 | f | b | t | , | 0 | 0 | textin | textout | i
> | x | f | 0 | -1 | 0 | |
> text | 7965528 | 152 | 4 | t | c | t | , | 8330945 | 0 | record_in | record_out | i
> | p | f | 0 | -1 | 0 | |
> unknown | 11 | 1 | -1 | f | b | t | , | 0 | 0 | unknownin | unknownout | i
> | p | f | 0 | -1 | 0 | |
> (3 rows)
>
> wedstrijdzeilen=> select * from pg_class where oid = 8330945;
> relname | relnamespace | reltype | relowner | relam | relfilenode | relpages | reltuples | reltoastrelid | reltoastidxid | relhasindex | re
> lisshared | relkind | relnatts | relchecks | reltriggers | relukeys | relfkeys | relrefs | relhasoids | relhaspkey | relhasrules | relhassub
> class | relacl
> ---------+--------------+---------+----------+-------+-------------+----------+-----------+---------------+---------------+-------------+---
> ----------+---------+----------+-----------+-------------+----------+----------+---------+------------+------------+-------------+----------
> ------+----------------------------------------------------------
> text | 7965528 | 8330946 | 152 | 0 | 8330945 | 0 | 0 | 8330947 | 0 | t | f
> | r | 2 | 0 | 0 | 0 | 0 | 0 | f | t | f | f
> | {=,wedstrijdzeilen_admin=arwdRxt,wedstrijdzeilen_user=r}
> (1 row)

Reference database:
> jochemd=> select * from pg_type where typname in ('unknown','text') order by typname;
> typname | typnamespace | typowner | typlen | typbyval | typtype | typisdefined | typdelim | typrelid | typelem | typinput | typoutput | t
> ypalign | typstorage | typnotnull | typbasetype | typtypmod | typndims | typdefaultbin | typdefault
> ---------+--------------+----------+--------+----------+---------+--------------+----------+----------+---------+-----------+------------+--
> --------+------------+------------+-------------+-----------+----------+---------------+------------
> text | 11 | 1 | -1 | f | b | t | , | 0 | 0 | textin | textout | i
> | x | f | 0 | -1 | 0 | |
> unknown | 11 | 1 | -1 | f | b | t | , | 0 | 0 | unknownin | unknownout | i
> | p | f | 0 | -1 | 0 | |
> (2 rows)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2005-06-07 09:03:21 Re: CHAR LIKE VARCHAR
Previous Message Himanshu Baweja 2005-06-07 08:44:12 Re: Logging query plan for queries