Re: [pgbr-geral] relation does not exist
Desculpe mais uma vez, nem olhei a fundo a documentacao. dei uma lida e vi o procedimento de atualização, porém agora acontece o seguinte, eu consigo migrar tudo certinho, as tabelas são criadas corretamente, porém o script envia algumas mensagens de erro: could not access file $libdir/liblwgeom.dll: No such file or directory Porém estou em um linux, no mínimo deveria dar o erro do .so, estou migrando de um windows para um linux, será que no banco antigo há algum resquício dessa dll? ls -l /usr/lib/postgresql/8.1/lib/liblwgeom.so lrwxrwxrwx 1 root root 16 2008-08-15 08:51 /usr/lib/postgresql/8.1/lib/liblwgeom.so - liblwgeom.so.1.1 está ai o modulo. entao fiz o seguinte, exportei a variavel libdir e criei um link do .dll para o .so: ln -s liblwgeom.so.1.1 liblwgeom.dll executei e agora os erros nao ocorreram, porém vieram os avisos/erros: createlang: language plpgsql is already installed in database web NOTICE: type histogram2d is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type histogram2d is only a shell NOTICE: type spheroid is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type spheroid is only a shell NOTICE: type geometry is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type geometry is only a shell NOTICE: return type geometry is only a shell NOTICE: argument type geometry is only a shell NOTICE: type box3d is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type box3d is only a shell NOTICE: type chip is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type chip is only a shell NOTICE: type box2d is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type box2d is only a shell NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index spatial_ref_sys_pkey for table spatial_ref_sys NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index geometry_columns_pk for table geometry_columns ERROR: language plpgsql already exists ERROR: function lockrow already exists with same argument types ERROR: function lockrow already exists with same argument types Isso é aceitável? Valeu essa bela gambia? Obrigado, Lucas. 2008/8/15 Luigi Castro Cardeles [EMAIL PROTECTED] Olá, no site do PostGIS tem o passo a passo de como vc instala o módulo. No seu caso que quer restaurar um banco, vc já leu a documentação? Existe um script em perl que faz isso pra vc, ele vem junto com a instalação. postigs_restore.pl []'s 2008/8/15 Roberto Mello [EMAIL PROTECTED] 2008/8/15 Lucas Mocellin [EMAIL PROTECTED]: Não foi o que aconteceu, instalei a extensao e continua dando erro: ERROR: type geometry does not exist ERROR: operator class btree_geometry_ops does not exist for access method btree De uma olhada nas instrucoes da extensao. Ela deve vir com um README ou INSTALL. Talvez voce tenha que carregar algum arquivo .sql que acompanha a distribuicao da extensao, para que novos tipos e funcoes sejam criados. Talvez isso tenha que ser feito no banco template1, para que esses novos objetos sejam criados em todos os bancos subsequentes, o que incluiria o banco que voce esta' restaurando. Roberto -- http://blog.divisiblebyfour.org/ ___ pgbr-geral mailing list pgbr-geral@listas.postgresql.org.br https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral -- Luigi Castro Cardeles ___ pgbr-geral mailing list pgbr-geral@listas.postgresql.org.br https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral ___ pgbr-geral mailing list pgbr-geral@listas.postgresql.org.br https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
Re: [pgbr-geral] relation does not exist
2008/8/18 Lucas Mocellin [EMAIL PROTECTED] Desculpe mais uma vez, nem olhei a fundo a documentacao. dei uma lida e vi o procedimento de atualização, porém agora acontece o seguinte, eu consigo migrar tudo certinho, as tabelas são criadas corretamente, porém o script envia algumas mensagens de erro: could not access file $libdir/liblwgeom.dll: No such file or directory Porém estou em um linux, no mínimo deveria dar o erro do .so, estou migrando de um windows para um linux, será que no banco antigo há algum resquício dessa dll? ls -l /usr/lib/postgresql/8.1/lib/liblwgeom.so lrwxrwxrwx 1 root root 16 2008-08-15 08:51 /usr/lib/postgresql/8.1/lib/liblwgeom.so - liblwgeom.so.1.1 está ai o modulo. entao fiz o seguinte, exportei a variavel libdir e criei um link do .dll para o .so: ln -s liblwgeom.so.1.1 liblwgeom.dll executei e agora os erros nao ocorreram, porém vieram os avisos/erros: createlang: language plpgsql is already installed in database web NOTICE: type histogram2d is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type histogram2d is only a shell NOTICE: type spheroid is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type spheroid is only a shell NOTICE: type geometry is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type geometry is only a shell NOTICE: return type geometry is only a shell NOTICE: argument type geometry is only a shell NOTICE: type box3d is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type box3d is only a shell NOTICE: type chip is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type chip is only a shell NOTICE: type box2d is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type box2d is only a shell NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index spatial_ref_sys_pkey for table spatial_ref_sys NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index geometry_columns_pk for table geometry_columns ERROR: language plpgsql already exists ERROR: function lockrow already exists with same argument types ERROR: function lockrow already exists with same argument types Erro mesmo, deve ser apenas um. Crie a linguagem antes de iniciar a importação: create language plpgsql; -- Ribamar FS - [EMAIL PROTECTED] http://ribafs.net ___ pgbr-geral mailing list pgbr-geral@listas.postgresql.org.br https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
Re: [pgbr-geral] relation does not exist
2008/8/18 Lucas Mocellin [EMAIL PROTECTED] isso ja está feito. pode ver que a primeira notificacao eh que a linguagem ja esta instalada. Tens razaão. Desculpe, foi a pressa. É isso, ao tentar criar a linguagem que já está criada dispara o erro. Em 18/08/08, Ribamar Sousa [EMAIL PROTECTED] escreveu: 2008/8/18 Lucas Mocellin [EMAIL PROTECTED] Desculpe mais uma vez, nem olhei a fundo a documentacao. dei uma lida e vi o procedimento de atualização, porém agora acontece o seguinte, eu consigo migrar tudo certinho, as tabelas são criadas corretamente, porém o script envia algumas mensagens de erro: could not access file $libdir/liblwgeom.dll: No such file or directory Porém estou em um linux, no mínimo deveria dar o erro do .so, estou migrando de um windows para um linux, será que no banco antigo há algum resquício dessa dll? ls -l /usr/lib/postgresql/8.1/lib/liblwgeom.so lrwxrwxrwx 1 root root 16 2008-08-15 08:51 /usr/lib/postgresql/8.1/lib/liblwgeom.so - liblwgeom.so.1.1 está ai o modulo. entao fiz o seguinte, exportei a variavel libdir e criei um link do .dll para o .so: ln -s liblwgeom.so.1.1 liblwgeom.dll executei e agora os erros nao ocorreram, porém vieram os avisos/erros: createlang: language plpgsql is already installed in database web NOTICE: type histogram2d is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type histogram2d is only a shell NOTICE: type spheroid is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type spheroid is only a shell NOTICE: type geometry is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type geometry is only a shell NOTICE: return type geometry is only a shell NOTICE: argument type geometry is only a shell NOTICE: type box3d is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type box3d is only a shell NOTICE: type chip is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type chip is only a shell NOTICE: type box2d is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type box2d is only a shell NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index spatial_ref_sys_pkey for table spatial_ref_sys NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index geometry_columns_pk for table geometry_columns ERROR: language plpgsql already exists ERROR: function lockrow already exists with same argument types ERROR: function lockrow already exists with same argument types Erro mesmo, deve ser apenas um. Crie a linguagem antes de iniciar a importação: create language plpgsql; -- Ribamar FS - [EMAIL PROTECTED] http://ribafs.net ___ pgbr-geral mailing list pgbr-geral@listas.postgresql.org.br https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral ___ pgbr-geral mailing list pgbr-geral@listas.postgresql.org.br https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral -- Ribamar FS - [EMAIL PROTECTED] http://ribafs.net ___ pgbr-geral mailing list pgbr-geral@listas.postgresql.org.br https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
Re: [pgbr-geral] relation does not exist
Olá, Vc está dando o restore entre versão distindas do PostGIS? da 1.3.2 pra 1.3.3? algumas funções são alteradas, vc deve rodar antes o arquivo lwpostgis_upgrade.sql. vc deu o dump do bando com -Fc? []'s 2008/8/18 Ribamar Sousa [EMAIL PROTECTED] 2008/8/18 Lucas Mocellin [EMAIL PROTECTED] isso ja está feito. pode ver que a primeira notificacao eh que a linguagem ja esta instalada. Tens razaão. Desculpe, foi a pressa. É isso, ao tentar criar a linguagem que já está criada dispara o erro. Em 18/08/08, Ribamar Sousa [EMAIL PROTECTED] escreveu: 2008/8/18 Lucas Mocellin [EMAIL PROTECTED] Desculpe mais uma vez, nem olhei a fundo a documentacao. dei uma lida e vi o procedimento de atualização, porém agora acontece o seguinte, eu consigo migrar tudo certinho, as tabelas são criadas corretamente, porém o script envia algumas mensagens de erro: could not access file $libdir/liblwgeom.dll: No such file or directory Porém estou em um linux, no mínimo deveria dar o erro do .so, estou migrando de um windows para um linux, será que no banco antigo há algum resquício dessa dll? ls -l /usr/lib/postgresql/8.1/lib/liblwgeom.so lrwxrwxrwx 1 root root 16 2008-08-15 08:51 /usr/lib/postgresql/8.1/lib/liblwgeom.so - liblwgeom.so.1.1 está ai o modulo. entao fiz o seguinte, exportei a variavel libdir e criei um link do .dll para o .so: ln -s liblwgeom.so.1.1 liblwgeom.dll executei e agora os erros nao ocorreram, porém vieram os avisos/erros: createlang: language plpgsql is already installed in database web NOTICE: type histogram2d is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type histogram2d is only a shell NOTICE: type spheroid is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type spheroid is only a shell NOTICE: type geometry is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type geometry is only a shell NOTICE: return type geometry is only a shell NOTICE: argument type geometry is only a shell NOTICE: type box3d is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type box3d is only a shell NOTICE: type chip is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type chip is only a shell NOTICE: type box2d is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type box2d is only a shell NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index spatial_ref_sys_pkey for table spatial_ref_sys NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index geometry_columns_pk for table geometry_columns ERROR: language plpgsql already exists ERROR: function lockrow already exists with same argument types ERROR: function lockrow already exists with same argument types Erro mesmo, deve ser apenas um. Crie a linguagem antes de iniciar a importação: create language plpgsql; -- Ribamar FS - [EMAIL PROTECTED] http://ribafs.net ___ pgbr-geral mailing list pgbr-geral@listas.postgresql.org.br https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral ___ pgbr-geral mailing list pgbr-geral@listas.postgresql.org.br https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral -- Ribamar FS - [EMAIL PROTECTED] http://ribafs.net ___ pgbr-geral mailing list pgbr-geral@listas.postgresql.org.br https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral -- Luigi Castro Cardeles ___ pgbr-geral mailing list pgbr-geral@listas.postgresql.org.br https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
Re: [pgbr-geral] relation does not exist
2008/8/15 Lucas Mocellin [EMAIL PROTECTED]: Não foi o que aconteceu, instalei a extensao e continua dando erro: ERROR: type geometry does not exist ERROR: operator class btree_geometry_ops does not exist for access method btree De uma olhada nas instrucoes da extensao. Ela deve vir com um README ou INSTALL. Talvez voce tenha que carregar algum arquivo .sql que acompanha a distribuicao da extensao, para que novos tipos e funcoes sejam criados. Talvez isso tenha que ser feito no banco template1, para que esses novos objetos sejam criados em todos os bancos subsequentes, o que incluiria o banco que voce esta' restaurando. Roberto -- http://blog.divisiblebyfour.org/ ___ pgbr-geral mailing list pgbr-geral@listas.postgresql.org.br https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
Re: [pgbr-geral] relation does not exist
Olá, no site do PostGIS tem o passo a passo de como vc instala o módulo. No seu caso que quer restaurar um banco, vc já leu a documentação? Existe um script em perl que faz isso pra vc, ele vem junto com a instalação. postigs_restore.pl []'s 2008/8/15 Roberto Mello [EMAIL PROTECTED] 2008/8/15 Lucas Mocellin [EMAIL PROTECTED]: Não foi o que aconteceu, instalei a extensao e continua dando erro: ERROR: type geometry does not exist ERROR: operator class btree_geometry_ops does not exist for access method btree De uma olhada nas instrucoes da extensao. Ela deve vir com um README ou INSTALL. Talvez voce tenha que carregar algum arquivo .sql que acompanha a distribuicao da extensao, para que novos tipos e funcoes sejam criados. Talvez isso tenha que ser feito no banco template1, para que esses novos objetos sejam criados em todos os bancos subsequentes, o que incluiria o banco que voce esta' restaurando. Roberto -- http://blog.divisiblebyfour.org/ ___ pgbr-geral mailing list pgbr-geral@listas.postgresql.org.br https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral -- Luigi Castro Cardeles ___ pgbr-geral mailing list pgbr-geral@listas.postgresql.org.br https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
[pgbr-geral] relation does not exist
Pessoal, acho que coloquei no tópico errado esse assunto, então aqui vai, vejo que são vários erros randômicos ERROR: could not access file $libdir/liblwgeom.dll: No such file or directory ERROR: function public.estimated_extent(text, text, text) does not exist ERROR: could not access file $libdir/liblwgeom.dll: No such file or directory ERROR: function public.estimated_extent(text, text) does not exist ERROR: type box3d does not exist ERROR: type box3d does not exist ERROR: type box2d does not exist ERROR: type box2d does not exist ERROR: type geometry does not exist ERROR: type geometry does not exist ERROR: type histogram2d does not exist ERROR: type histogram2d does not exist ERROR: type geometry does not exist ERROR: type geometry does not exist ERROR: type chip does not exist ERROR: type chip does not exist ERROR: type box2d does not exist ERROR: function public.find_extent(text, text, text) does not exist ERROR: type box2d does not exist ERROR: function public.find_extent(text, text) does not exist Estou fazendo o dump de maneira errada? Desculpem minha ignorância sobre o assunto, porém dei uma boa procurada no google sobre e não encontrei nada. Estou migrando um banco do 8.2.4 para 8.3.3. Obrigado, Lucas. -- Forwarded message -- From: Lucas Mocellin [EMAIL PROTECTED] Date: 2008/8/14 Subject: Re: [pgbr-geral] Como configurar o PostgreSQL 8.3 para pt_BR? To: Comunidade PostgreSQL Brasileira pgbr-geral@listas.postgresql.org.br Consegui criar o banco em LATIN1, porém agora a briga é para importar os dados, vejam: ERROR: relation cidade does not exist ERROR: relation cidade does not exist ERROR: relation cidade does not exist ERROR: relation cidade does not exist ERROR: relation cidade does not exist ERROR: relation cidade does not exist ERROR: relation cidade does not exist pg_restore: [archiver (db)] could not execute query: ERROR: type public.chip does not exist Command was: ALTER TYPE public.chip OWNER TO postgres; pg_restore: creating FUNCTION geometry_analyze(internal) pg_restore: [archiver (db)] Error from TOC entry 25; 1255 16833 FUNCTION geometry_analyze(internal) postgres pg_restore: [archiver (db)] could not execute query: ERROR: could not access file $libdir/liblwgeom.dll: No such file or directory Command was: CREATE FUNCTION geometry_analyze(internal) RETURNS boolean AS '$libdir/liblwgeom.dll', 'LWGEOM_analyze' LANGUAGE c S... pg_restore: [archiver (db)] could not execute query: ERROR: function public.geometry_analyze(internal) does not exist Command was: ALTER FUNCTION public.geometry_analyze(internal) OWNER TO postgres; pg_restore: creating FUNCTION geometry_in(cstring) pg_restore: [archiver (db)] Error from TOC entry 26; 1255 16835 FUNCTION geometry_in(cstring) postgres pg_restore: [archiver (db)] could not execute query: ERROR: could not access file $libdir/liblwgeom.dll: No such file or directory Command was: CREATE FUNCTION geometry_in(cstring) RETURNS geometry AS '$libdir/liblwgeom.dll', 'LWGEOM_in' LANGUAGE c IMMUTABLE S... pg_restore: [archiver (db)] could not execute query: ERROR: function public.geometry_in(cstring) does not exist Command was: ALTER FUNCTION public.geometry_in(cstring) OWNER TO postgres; pg_restore: creating FUNCTION geometry_out(geometry) pg_restore: [archiver (db)] Error from TOC entry 27; 1255 16836 FUNCTION geometry_out(geometry) postgres pg_restore: [archiver (db)] could not execute query: ERROR: type geometry does not exist Command was: CREATE FUNCTION geometry_out(geometry) RETURNS cstring AS '$libdir/liblwgeom.dll', 'LWGEOM_out' LANGUAGE c IMMUTABLE... Estou migrando o banco com: 1 - pg_dump -i -h x.x.x.x -F c -v -f /tmp/web.sql web 2 - crio o banco 3 - pg_restore -c -v -d cotesa_web /tmp/cotesa_web.sql Pesquisei sobre, mas não encontrei nada muito bom, algo sobre um bug na ordenação dos comandos gerados pelo DUMP, porém sem soluções a nao ser reordenar manualmente (???). Alguém já passou por isso? Obrigado, Lucas. 2008/8/14 Lucas Mocellin [EMAIL PROTECTED] Obrigado pessoal pelas respostas, vou dar uma boa lida nesses documentos e depois posto aqui o resultado. Obrigado mesmo! Lucas. 2008/8/13 Roberto Mello [EMAIL PROTECTED] 2008/8/13 Lucas Mocellin [EMAIL PROTECTED]: Como é uma migração de um banco que o pessoal usa windows, não estou interessado em converter o banco ou algo do gênero, gostaria de deixar no mesmo encoding. Como posso criar isso? Recrie o cluster, com o PG desligado: initdb -E LATIN1 -D caminho\para\seu\cluster Preciso manter o UTF-8 como locale do sistema, porém meu locale -a não tem o LATIN1. Qual distribuicao? No Debian (ou Ubuntu) faca um `dpkg-reconfigure locales` Desculpe-me pela repetição, mas sinto-me um pouco perdido quando se fala de locales, encodings, etc.. http://blog.divisiblebyfour.org/2008/03/postgresql-e-codificaes-postgresql-and.html Roberto --