Обсуждение:

Поиск
Список
Период
Сортировка

От
"Vasileiadis Spyros"
Дата:
I use postgres v.7.0 and I access through libzeos v.1.4.4

while testing an application I got the message

pq_recvbuf: unexpected EOF on client connection

there are two tables involved:

create table thtm (
    htmid serial primary key,
    htmname varchar(256) not null,
    next int4 not null);

create table lekt (
    lek_id int4 not null references thtm(htmid) on update cascade on delete
cascade,
    lek_num int4 not null,
    lek varchar(256),
    primary key (lek_id,lek_num));

and one function:

create function "nextid"(int4) returns int4 as'
lock table thtm in share row exclusive mode;
update thtm set next=next+1 where htmid = $1;
select next-1 as result from thtm where htmid = $1;
' language 'SQL';

the application perfomrs a huge number of insert's like this:
insert into lekt (1000,nextid(100),"something");

I wonder if this is a known problem and an upgrade to v.7.0.2 would solve
the problem or if this is really an unknown bug

thanks in advance

SV