[SQL] all server processes terminated; reinitializing

2005-05-04 Thread 2000 Informatica




Estou usando PostgreSQL 8.0.2 instalado no linux Fedora FC2.
Esta é a messagem gravada no meu "serverlog":
WARNING: terminating connection because of crash of another server 
process
DETAIL: The postmaster has commanded this server process to roll back the 
current transaction and exit, because another server process exited abnormally 
and possibly corrupted shared memory.
HINT: In a moment you should be able to reconnect to the database and repeat 
your command.
LOG: all server processes terminated; reinitializing
LOG: database system was interrupted at 2005-05-04 11:39:53 BRT
LOG: checkpoint record is at 0/6CE514D8
LOG: redo record is at 0/6CE514D8; undo record is at 0/0; shutdown TRUE
LOG: next transaction ID: 1229401; next OID: 2226116
LOG: database system was not properly shut down; automatic recovery in 
progress
LOG: redo starts at 0/6CE51514
LOG: unexpected pageaddr 0/65E5E000 in log file 0, segment 108, offset 
15065088
LOG: redo done at 0/6CE5DD24
LOG: database system is ready
 
Como devo proceder?
 


Re: [SQL] ERROR: SELECT query has no destination for result data

2006-08-31 Thread 2000 Informatica



 
Ezequias,
 
Declare a variavel  numRegistros 
dentro da funcao e altere o SELECT p/
 
 select count(id) INTO numRegistros from 
base.emissor_ponto_venda where id = PontoVenda_Emissor; 

 
q vai dar certo, OK ??
 
 
SPS
2000Info
 


  - Original Message - 
  From: 
  Ezequias Rodrigues da Rocha 
  To: pgsql-sql@postgresql.org 
  Sent: Thursday, August 31, 2006 10:00 
  AM
  Subject: [SQL] ERROR: SELECT query has no 
  destination for result data
  Hi 
  list,I have a function like this:Create OR REPLACE Function 
  base.inserirPontos(char(1), varchar(255), numeric(12,2), int8, int8, int8 ) 
  returns int4 as $$declare    Operacao alias for 
  $1;    Numero_nota alias for 
  $2;    Valor_nota alias for 
  $3;    PontoVenda_Emissor 
  alias for $4;    Cardpass alias for 
  $5;    Cx_Id alias for 
  $6; begin-- Validando parâmetros passados na 
  função  if Operacao <> 'C' 
  then return 
  1;   else select 
  count(id) as numRegistros from base.emissor_ponto_venda where id = 
  PontoVenda_Emissor;  if numRegistros 
  = 0 then    
  return 2;    
  else    
  insert into base.pontos values (nextval('base.ponto_id'), now(), Operacao, 
  Numero_nota, Valor_nota, PontoVenda_Emissor, CartaoId(Cardpass), Cx_id); 
      
  return 0;    end if; 
    end if;end$$ LANGUAGE 'plpgsql'And I am getting the following result 
  when I try to insert using the function:select base.inserirPontos('C', '123456789', 12.5, 1, 
  987700944005, 104)ERROR:  SELECT query has no destination for 
  result dataHINT:  If you want to discard the results, 
  use PERFORM instead.CONTEXT:  PL/pgSQL function "inserirpontos" 
  line 17 at SQL statement What I did wrong ? Any suggestion is quite 
  good please.ps: -- 
  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-  Atenciosamente 
  (Sincerely) 
  Ezequias 
  Rodrigues da 
  Rocha=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-A 
  pior das democracias ainda é melhor do que a melhor das ditadurasThe worst 
  of democracies is still better than the better of dictatorships http://ezequiasrocha.blogspot.com/ 

  
  

  No virus found in this incoming message.Checked by AVG Free 
  Edition.Version: 7.1.405 / Virus Database: 268.11.7/434 - Release Date: 
  30/8/2006