Em 29/11/11, Pedro Costa<[email protected]> escreveu: > Mesmo assim não deixa. Tenho a ultima versao. > > Erro: > > ERRO: CHECK constraints cannot be marked NOT VALID > > > Com os melhores cumprimentos, > > Pedro Costa > Geógrafo > Especializado em Sistemas de Informação Geográfica e Ordenamento do > Território > > > > Em 27-11-2011 15:19, Osvaldo Kussama escreveu: >> Em 27/11/11, Pedro Costa<[email protected]> escreveu: >>> tentei assim: >>> >>> ALTER TABLE passeios ADD CHECK ( esta_teste>= 0 and esta_teste< 13 ) >>> NOT VALID; >>> >>> >>> Mas dá erro. alguém sabe porquê? >>> >>> >>> ERROR: syntax error at or near "NOT" >>> LINE 1: ALTER TABLE passeios ADD CHECK ( esta_teste>= 0) NOT VALID; >>> ^ >>> >>> ********** Erro ********** >>> >>> ERROR: syntax error at or near "NOT" >>> Estado de SQL:42601 >>> Carácter:51 >>> >> >> Você não informou qual versão do PostgreSQL está utilizando. >> A opção NOT VALID só é válida a partir da versão 9.1. [1] [2] >> >> Osvaldo >> [1] http://www.postgresql.org/docs/current/interactive/sql-altertable.html >> [2] http://www.postgresql.org/docs/current/interactive/release-9-1.html >> (E.2.3.4.2. CREATE/ALTER TABLE) >> _______________________________________________
Do manual [1] aplicável à versão 9.1: "the option NOT VALID, which is currently only allowed for foreign key constraints" http://www.postgresql.org/docs/current/interactive/sql-altertable.html Osvaldo _______________________________________________ pgbr-geral mailing list [email protected] https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
