got some errors after upgrade poestgresql from 9.5 to 9.6

Поиск
Список
Период
Сортировка
От 张嘉志
Тема got some errors after upgrade poestgresql from 9.5 to 9.6
Дата
Msg-id 176151950.16244873.1476250054458.JavaMail.zimbra@p1.com
обсуждение исходный текст
Ответы Re: got some errors after upgrade poestgresql from 9.5 to 9.6  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-bugs
Hi
 I am got a problem after upgrade poestgresql from 9.5 to 9.6 .it's occurred when calling an exits function .



putong-contacts=# select insert_user_mobile_contact_hashes(4009, '', ARRAY['7bd94067bb0597bf995c4eb46364a4ce'],
ARRAY['c55288a186d0e6f0e3fb3b66deb65366'],ARRAY[''], false); 
ERROR:  table row type and query-specified row type do not match
DETAIL:  Query provides a value for a dropped column at ordinal position 6.
CONTEXT:  SQL statement "UPDATE c                       SET                             phone_number =
phone_number_arr_[i],                            name = name_                       WHERE
user_id= user_id_                       AND                             md5_hash11 = md5_hash11_arr_[i]
     AND                             coalesce(phone_number,'') = ''                       AND
 char_length(phone_number_arr_[i]) > 0" 
PL/pgSQL function insert_user_mobile_contact_hashes(integer,character varying,character varying[],character
varying[],charactervarying[],boolean) line 36 at SQL statement 


and here is the column in this table be dropped

putong-contacts=# select *  from pg_attribute where attrelid = 'user_mobile_contact_hashes'::regclass and
attisdropped;attrelid|            attname            | atttypid | attstattarget | attlen | attnum | attndims |
attcacheoff| atttypmod | attbyval | attstorage | attalign | attnotnull | atthasdef | attisdropped | attislocal |
attinhcount| attcollation | attacl | attoptions | attfdwoptions  

----------+-------------------------------+----------+---------------+--------+--------+----------+-------------+-----------+----------+------------+----------+------------+-----------+--------------+------------+-------------+--------------+--------+------------+---------------
6097850| ........pg.dropped.6........  |        0 |             0 |      8 |      6 |        0 |          -1 |
-1| f        | p          | d        | f          | f         | t            | t          |           0 |            0
|       |            |  6097850 | ........pg.dropped.10........ |        0 |             0 |      1 |     10 |        0
|         -1 |        -1 | f        | p          | c        | f          | f         | t            | t          |
    0 |            0 |        |            |  




when i create this table user_mobile_contact_hashes , the function works well. i try to delete those 2 dropped column
infofrom system catalog table , but it can't work  and got other problems. 

putong-contacts=# select insert_user_mobile_contact_hashes(4009, '', ARRAY['7bd94067bb0597bf995c4eb46364a4ce'],
ARRAY['c55288a186d0e6f0e3fb3b66deb65366'],ARRAY[''], false); 
ERROR:  catalog is missing 2 attribute(s) for relid 6097850

Can you explain this issue and  give me some advise how to handle this . thanks a lot .



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #14362: Postgres macaddr does not support EUI-64 8-byte MAC addresses
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: got some errors after upgrade poestgresql from 9.5 to 9.6