Re: pg_dump 8.0.3 failing against PostgreSQL 7.3.2

Поиск
Список
Период
Сортировка
От Jochem van Dieten
Тема Re: pg_dump 8.0.3 failing against PostgreSQL 7.3.2
Дата
Msg-id 42A56153.4070003@oli.tudelft.nl
обсуждение исходный текст
Ответ на Re: pg_dump 8.0.3 failing against PostgreSQL 7.3.2  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pg_dump 8.0.3 failing against PostgreSQL 7.3.2  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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)

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

Предыдущее
От: Himanshu Baweja
Дата:
Сообщение: Re: Logging query plan for queries
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: CHAR LIKE VARCHAR