[SQL] Relatorio da composiçao de FKs e PKs

2009-03-19 Thread paulo matadr
Bom tarde mais um vez , minha intensao era fazer um relatorio da composicao de cada fk e pk( nao apenas seu nome),alguem sabe onde o postgres guarda isso no catalogo. Abraço a todos. Veja quais são os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com

Res: [SQL] UPDATE and DELEte with a lot of register is to slow...

2008-11-20 Thread paulo matadr
did you make analyse(vacuum ) in you database? De: Craig Ringer <[EMAIL PROTECTED]> Para: John Dizaro <[EMAIL PROTECTED]> Cc: pgsql-sql@postgresql.org Enviadas: Quinta-feira, 20 de Novembro de 2008 8:29:55 Assunto: Re: [SQL] UPDATE and DELEte with a lot of reg

[SQL] Enc: Help to replace caracter

2008-11-14 Thread paulo matadr
I Need to replace string (" ) in the situation below : select clie_nmclientefrom cadastro.cliente where clie_nmcliente like '%"%'; result: JOANA D"ARCALMEIDA" EMLURB "P M R." CECILIA D"CAGNO" HELENA FERREIRA D"FREITAS" JOSE M. "BARRACA DO BOLA" FORTE" DUNAS BAR" JOANA D"ARC R. DE SO

Res: [SQL] sum timestamp result in hours

2008-11-07 Thread paulo matadr
<[EMAIL PROTECTED]> Para: paulo matadr <[EMAIL PROTECTED]> Enviadas: Sexta-feira, 7 de Novembro de 2008 12:50:14 Assunto: Re: [SQL] sum timestamp result in hours 2008/11/7, paulo matadr <[EMAIL PROTECTED]>: > Select sum(age(rgat.rgat_tmencerramento, rgat.rgat_tmregistr

[SQL] sum timestamp result in hours

2008-11-07 Thread paulo matadr
Select sum(age(rgat.rgat_tmencerramento, rgat.rgat_tmregistroatendimento)) from atendimentopublico.registro_atendimento rgat inner join cadastro.localidade loca on loca.loca_id=rgat.loca_id inner join atendimentopublico.solicitacao_tipo_especificacao step on step.step_id=rgat.step_id where date(rg

Res: [SQL] Finding all tables that have foreign keys referencing a table

2008-11-07 Thread paulo matadr
Try this select table_schema, table_name from information_schema.columns where table_schema not in ('information_schema','pg_catalog') and column_name = '?' De: Andreas Joseph Krogh <[EMAIL PROTECTED]> Para: pgsql-sql@postgresql.org Enviadas: Quinta-feira, 6 de N