Euler,

fiz o seguinte:

SELECT count(*) FROM pg_attribute WHERE attnum > 0 AND attrelid = 167017;
Resultado = 22

onde 167017 = fase_laudo_apac

Após fiz:

update pg_class set relnatts = 22 where relname = 'fase_laudo_apac'

Agora obtenho a mensagem:

ERROR:  invalid attribute number 23 for fase_laudo_apac
LINE 1: Select count(*) as rows from only fase_laudo_apac
                                          ^
********** Error **********
ERROR: invalid attribute number 23 for fase_laudo_apac
SQL state: XX000
Character: 35

Onde posso ter errado?


Euler Taveira de Oliveira-2 wrote:
> 
> Em 10-08-2011 21:01, Marcos Oliveira escreveu:
>> Catalog is missing 4 attribute(s) form relid 167017.
>>
> Atualize relnatts em pg_class com o número de colunas retornadas em
> 
> SELECT count(*) FROM pg_attribute WHERE attnum > 0 AND attrelid = 167017;
> 
> 
> -- 
>    Euler Taveira de Oliveira - Timbira       http://www.timbira.com.br/
>    PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento
> _______________________________________________
> pgbr-geral mailing list
> [email protected]
> https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Remover-linhas-corrompidas-da-Pg_Attribute-tp32226684p32407953.html
Sent from the PostgreSQL - Brasil mailing list archive at Nabble.com.

_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Responder a