Re Problem with new function - Mailing list pgsql-hackers

From Grzegorz Przeździecki
Subject Re Problem with new function
Date
Msg-id 37E9EAE2.A9DC3B9F@lupus.waw.pl
Whole thread Raw
List pgsql-hackers
I write to you few minuts ego.

I show you two files

-----------------------------------1---------------------------------
--/***************************************************************************/

--! 23.09.1999  Warszawa
--% Grzegorz Przezdziecki
--@ grzegorz_przezdziecki@crn.pl;gprzezdz@elektron.elka.pw.edu.pl
--# CREATE FUNCTION fu_idklienci() RETURNS OPAQUE AS'
--$ funkcja bedzie wywololywana przez triger w momencie dodania nowego
telefonu
--$ do tablei telefonow klienta
--/***************************************************************************/



--/***************************************************************************/

--                    FUNKCJA PRZED INSERTEM DO TABELI telefon klienta
--/***************************************************************************/

CREATE FUNCTION fu_idklienci() RETURNS OPAQUE AS'               DECLARE                       id int4;
BEGIN

--SPRAWDZAMY FIRME
                       IF NEW.firma ISNULL THEN                               RAISE EXCEPTION ''Pole firma musi
posiadac wartosc'';                       END IF;                       SELECT id_firmy INTO id  FROM tb_firmy WHERE
id_firmy = NEW.id_firma;                       IF NOT FOUND  THEN                               RAISE EXCEPTION ''Brak
firmynumer
 
%'',NEW.id_firma;                       END If;

                       NEW.ID_klienci:=nextval(''se_idklienci'');                       RETURN NEW;               END;'
             LANGUAGE 'plpgsql';
 
--/***************************************************************************/

--/***************************************************************************/

this file makes errors
pqReadData() -- backend closed the channel unexpectedly.       This probably means the backend terminated abnormally
  before or while processing the request.
 
We have lost the connection to the backend, so further processing is
impossible. Terminating.
and in log file :
Sep 23 11:00:14 Databases logger: FATAL 1:  btree: cannot split if start
(2) >=
maxoff (2)

second file is OK
------------------------------------------2------------------------------------------

--/***************************************************************************/

--! 23.09.1999  Warszawa
--% Grzegorz Przezdziecki
--@ grzegorz_przezdziecki@crn.pl;gprzezdz@elektron.elka.pw.edu.pl
--# CREATE FUNCTION fu_idklienci() RETURNS OPAQUE AS'
--$ funkcja bedzie wywololywana przez triger w momencie dodania nowego
telefonu
--$ do tablei telefonow klienta
--/***************************************************************************/



--/***************************************************************************/

--                    FUNKCJA PRZED INSERTEM DO TABELI telefon klienta
--/***************************************************************************/

CREATE FUNCTION fu_idklienci() RETURNS OPAQUE AS'               DECLARE                       id int4;
BEGIN

                       IF NEW.firma ISNULL THEN                               RAISE EXCEPTION ''Pole firma musi
posiadac wartosc'';                       END IF;                       SELECT id_firmy INTO id  FROM tb_firmy WHERE
id_firmy = NEW.id_firma;                       IF NOT FOUND  THEN                               RAISE EXCEPTION ''Brak
firmynumer
 
%'',NEW.id_firma;                       END If;

                       NEW.ID_klienci:=nextval(''se_idklienci'');                       RETURN NEW;               END;'
             LANGUAGE 'plpgsql';
 
--/***************************************************************************/

--/***************************************************************************/



Diference is in line

--SPRAWDZAMY FIRME

I use
Zed editor
[PostgreSQL 6.5.1 on i686-pc-linux-gnu, compiled by gcc 2.7.2.3]
on Debian
kernel 2.0.36

What is means this error
Sep 23 11:00:14 Databases logger: FATAL 1:  btree: cannot split if start
(2) >=
maxoff (2)

Best regards



pgsql-hackers by date:

Previous
From: Leon
Date:
Subject: Re:
Next
From: Jose Antonio Cotelo lema
Date:
Subject: Problems when opening large objects in the server side.